本文介绍了如何在VB.net中轻松反序列化以下XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="OrderList">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="AccountName" type="xs:string" />
        <xs:element name="ReportVersion" type="xs:decimal" />
        <xs:element name="ReportID" type="xs:unsignedByte" />
        <xs:element name="ReportTimeGMT" type="xs:dateTime" />
        <xs:element name="CountOrderLineItem" type="xs:unsignedShort" />
        <xs:element name="OrderData">
          <xs:complexType>
            <xs:sequence>
              <xs:element maxOccurs="unbounded" name="Order">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="OrderTimeGMT" type="xs:dateTime" />
                    <xs:element name="OrderID" type="xs:unsignedInt" />
                    <xs:element name="Marketplace" type="xs:string" />
                    <xs:element name="MarketplaceOrderNumber" type="xs:string" />
                    <xs:element name="Customer">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="EmailAddress" type="xs:string" />
                          <xs:element name="Firstname" type="xs:string" />
                          <xs:element name="Lastname" type="xs:string" />
                          <xs:element name="DayPhone" type="xs:string" />
                          <xs:element name="NightPhone" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ShippingInfo">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AddressLine1" type="xs:string" />
                          <xs:element name="AddressLine2" type="xs:string" />
                          <xs:element name="AddressLine3" />
                          <xs:element name="City" type="xs:string" />
                          <xs:element name="Region" type="xs:string" />
                          <xs:element name="RegionDescription" type="xs:string" />
                          <xs:element name="PostalCode" type="xs:string" />
                          <xs:element name="CountryCode" type="xs:string" />
                          <xs:element name="CompanyName" />
                          <xs:element name="Title" />
                          <xs:element name="FirstName" type="xs:string" />
                          <xs:element name="LastName" type="xs:string" />
                          <xs:element name="Suffix" />
                          <xs:element name="PhoneNumberDay" type="xs:string" />
                          <xs:element name="PhoneNumberEvening" />
                          <xs:element name="ShippingCarrier" type="xs:string" />
                          <xs:element name="ShippingClass" type="xs:string" />
                          <xs:element name="ShippingInstructions" type="xs:string" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="LineItemSKUList">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element maxOccurs="unbounded" name="OrderLineItemItem">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="LineItemID" type="xs:string" />
                                <xs:element name="UPC" type="xs:string" />
                                <xs:element name="PONumber" type="xs:string" />
                                <xs:element name="ReferencePO" type="xs:string" />
                                <xs:element name="SupplierPO" />
                                <xs:element name="SKU" type="xs:string" />
                                <xs:element name="Title" type="xs:string" />
                                <xs:element name="Quantity" type="xs:unsignedByte" />
                                <xs:element name="UnitPrice" type="xs:decimal" />
                                <xs:element name="DistributionCenterCode" type="xs:string" />
                                <xs:element name="IsBook" type="xs:boolean" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

推荐答案


这篇关于如何在VB.net中轻松反序列化以下XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 23:12