在VB.Net中以编程方式执行XSD.EXE

在VB.Net中以编程方式执行XSD.EXE,vb.net,xsd,Vb.net,Xsd,如何在vb.net代码中以编程方式启动xsd.exe 下面是我尝试执行的一个示例: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.connecture.com/Schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:exp="http://www.connecture.com/Schemas" elemen

如何在vb.net代码中以编程方式启动xsd.exe

下面是我尝试执行的一个示例:

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema targetNamespace="http://www.connecture.com/Schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:exp="http://www.connecture.com/Schemas" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.1">
    <xs:include schemaLocation="../common/ExpCommon_1.2.xsd"/>
    <xs:complexType name="typeBeneficiaryData">
        <xs:annotation>
            <xs:documentation>Beneficiary (for life insurance plans).</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="First" type="exp:typeFirstName">
                <xs:annotation>
                    <xs:documentation>Beneficiary's first name.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:choice minOccurs="0">
                <xs:element name="MiddleInitial" type="exp:typeMiddleInitial">
                    <xs:annotation>
                        <xs:documentation>Beneficiary's middle initial.</xs:documentation>
                    </xs:annotation>
                </xs:element>
                <xs:element name="MiddleName" type="exp:typeMiddleName">
                    <xs:annotation>
                        <xs:documentation>Beneficiary's middle name.</xs:documentation>
                    </xs:annotation>
                </xs:element>
            </xs:choice>
            <xs:element name="Last" type="exp:typeLastName">
                <xs:annotation>
                    <xs:documentation>Beneficiary's last name.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Suffix" type="exp:typeNameSuffix" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>Beneficiary's name suffix.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Relationship" type="exp:typeBeneficiaryRelationshipType">
                <xs:annotation>
                    <xs:documentation>Beneficiary's relationship to the primary subscriber.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Percentage">
                <xs:annotation>
                    <xs:documentation>Percentage of proceeds assigned to beneficiary.</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:int">
                        <xs:minInclusive value="0"/>
                        <xs:maxInclusive value="100"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
            <xs:element name="City" type="exp:typeCity">
                <xs:annotation>
                    <xs:documentation>Beneficiary's residence city.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="State" type="exp:typeUSState">
                <xs:annotation>
                    <xs:documentation>Beneficiary's residence state.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="Zip" type="exp:typeZip">
                <xs:annotation>
                    <xs:documentation>Beneficiary's residence zip code.</xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="ClientDefinedData" type="exp:typeKeyValueData" minOccurs="0">
                <xs:annotation>
                    <xs:documentation>Client specific additional data elements.</xs:documentation>
                </xs:annotation>
            </xs:element>
        </xs:sequence>
    </xs:complexType>
    <xs:simpleType name="typeBeneficiaryRelationshipType">
        <xs:annotation>
            <xs:documentation>Beneficiary Relationship Types</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="husband">
                <xs:annotation>
                    <xs:documentation>Husband</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="wife">
                <xs:annotation>
                    <xs:documentation>Wife</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="son">
                <xs:annotation>
                    <xs:documentation>Son</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="daughter">
                <xs:annotation>
                    <xs:documentation>Daughter</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="relative">
                <xs:annotation>
                    <xs:documentation>Relative</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="friend">
                <xs:annotation>
                    <xs:documentation>Friend</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="other">
                <xs:annotation>
                    <xs:documentation>Other</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>

受益人(人寿保险计划)。
受益人的名字。
受益人的中间首字母。
受益人的中间名。
受益人的姓氏。
受益人姓名后缀。
受益人与主要认购人的关系。
分配给受益人的收益百分比。
受益人居住城市。
受益人的居住国。
受益人住所的邮政编码。
特定于客户端的附加数据元素。
受益人关系类型
丈夫
妻子
儿子
女儿
相对的
朋友
其他

执行是什么意思?使用?您应该能够使用适当的参数调用它,并让它为您运行XSD.exe。