Imports System.Collections.Generic
Imports System.Xml.Schema
Imports System.Xml.Serialization
Imports Microsoft.VisualBasic
Dim xml as new CXML() With {
.Header = new Header() With {
.From = new From() With {
.Credential = new Credential() With {
.Credential = new Credential() With {
.Sender = new Sender() With {
.Credential = new Credential() With {
.Request = new Request() With {
.OrderRequest = new OrderRequest() With {
.OrderRequestHeader = new OrderRequestHeader() With {
.Total = new Total() With {
.ShipTo = new ShipTo() With {
.Address = new Address() With {
.Name = new Name() With {
.PostalAddress = new PostalAddress() With {
.Country = new Country() With {
.BillTo = new BillTo() With {
.Address = new Address() With {
.Name = new Name() With {
.PostalAddress = new PostalAddress() With {
.Country = new Country() With {
.ItemOut = new List(Of ItemOut) From {
.ItemID = new ItemID() With {
.ItemDetail = new ItemDetail() With {
.UnitPrice = new UnitPrice() With {
.Description = new Description() With {
.Classification = new Classification() With {
Dim serializer as new XmlSerializer(gettype(CXML))
using ms as new MemoryStream()
serializer.Serialize(ms, xml)
Dim result as string = new StreamReader(ms).ReadToEnd()
Console.WriteLine(result)
<XmlRoot(ElementName:="Credential")>
<XmlElement(ElementName:="Identity")>
Public Property Identity As String
<XmlAttribute(AttributeName:="domain")>
Public Property Domain As String
<XmlRoot(ElementName:="From")>
<XmlElement(ElementName:="Credential")>
Public Property Credential As Credential
<XmlRoot(ElementName:="To")>
<XmlElement(ElementName:="Credential")>
Public Property Credential As Credential
<XmlRoot(ElementName:="Sender")>
<XmlElement(ElementName:="Credential")>
Public Property Credential As Credential
<XmlElement(ElementName:="UserAgent")>
Public Property UserAgent As String
<XmlRoot(ElementName:="Header")>
<XmlElement(ElementName:="From")>
Public Property From As From
<XmlElement(ElementName:="To")>
Public Property [To] As [To]
<XmlElement(ElementName:="Sender")>
Public Property Sender As Sender
<XmlRoot(ElementName:="Total")>
<XmlElement(ElementName:="Money")>
Public Property Money As String
<XmlRoot(ElementName:="Name")>
<XmlAttribute(AttributeName:="lang", [Namespace]:="http://www.w3.org/XML/1998/namespace")>
Public Property Lang As String
Public Property Text As String
<XmlRoot(ElementName:="Country")>
<XmlAttribute(AttributeName:="isoCountryCode")>
Public Property IsoCountryCode As String
<XmlRoot(ElementName:="PostalAddress")>
Public Class PostalAddress
<XmlElement(ElementName:="Street")>
Public Property Street As String
<XmlElement(ElementName:="City")>
Public Property City As String
<XmlElement(ElementName:="State")>
Public Property State As String
<XmlElement(ElementName:="PostalCode")>
Public Property PostalCode As String
<XmlElement(ElementName:="Country")>
Public Property Country As Country
<XmlRoot(ElementName:="Address")>
<XmlElement(ElementName:="Name")>
Public Property Name As Name
<XmlElement(ElementName:="PostalAddress")>
Public Property PostalAddress As PostalAddress
<XmlAttribute(AttributeName:="isoCountryCode")>
Public Property IsoCountryCode As String
<XmlAttribute(AttributeName:="addressID")>
Public Property AddressID As String
<XmlRoot(ElementName:="ShipTo")>
<XmlElement(ElementName:="Address")>
Public Property Address As Address
<XmlRoot(ElementName:="BillTo")>
<XmlElement(ElementName:="Address")>
Public Property Address As Address
<XmlRoot(ElementName:="OrderRequestHeader")>
Public Class OrderRequestHeader
<XmlElement(ElementName:="Total")>
Public Property Total As Total
<XmlElement(ElementName:="ShipTo")>
Public Property ShipTo As ShipTo
<XmlElement(ElementName:="BillTo")>
Public Property BillTo As BillTo
<XmlAttribute(AttributeName:="orderDate")>
Public Property OrderDate As String
<XmlAttribute(AttributeName:="orderID")>
Public Property OrderID As String
<XmlAttribute(AttributeName:="orderType")>
Public Property OrderType As String
<XmlAttribute(AttributeName:="orderVersion")>
Public Property OrderVersion As String
<XmlAttribute(AttributeName:="type")>
Public Property Type As String
<XmlRoot(ElementName:="ItemID")>
<XmlElement(ElementName:="SupplierPartID")>
Public Property SupplierPartID As String
<XmlElement(ElementName:="BuyerPartID")>
Public Property BuyerPartID As String
<XmlRoot(ElementName:="UnitPrice")>
<XmlElement(ElementName:="Money")>
Public Property Money As String
<XmlRoot(ElementName:="Description")>
<XmlAttribute(AttributeName:="lang", [Namespace]:="http://www.w3.org/XML/1998/namespace")>
Public Property Lang As String
Public Property Text As String
<XmlRoot(ElementName:="Classification")>
Public Class Classification
<XmlAttribute(AttributeName:="domain")>
Public Property Domain As String
<XmlRoot(ElementName:="ItemDetail")>
<XmlElement(ElementName:="UnitPrice")>
Public Property UnitPrice As UnitPrice
<XmlElement(ElementName:="Description")>
Public Property Description As Description
<XmlElement(ElementName:="UnitOfMeasure")>
Public Property UnitOfMeasure As String
<XmlElement(ElementName:="Classification")>
Public Property Classification As Classification
<XmlRoot(ElementName:="ItemOut")>
<XmlElement(ElementName:="ItemID")>
Public Property ItemID As ItemID
<XmlElement(ElementName:="ItemDetail")>
Public Property ItemDetail As ItemDetail
<XmlAttribute(AttributeName:="isAdHoc")>
Public Property IsAdHoc As String
<XmlAttribute(AttributeName:="lineNumber")>
Public Property LineNumber As String
<XmlAttribute(AttributeName:="quantity")>
Public Property Quantity As String
<XmlRoot(ElementName:="OrderRequest")>
Public Class OrderRequest
<XmlElement(ElementName:="OrderRequestHeader")>
Public Property OrderRequestHeader As OrderRequestHeader
<XmlElement(ElementName:="ItemOut")>
Public Property ItemOut As List(Of ItemOut)
<XmlRoot(ElementName:="Request")>
<XmlElement(ElementName:="OrderRequest")>
Public Property OrderRequest As OrderRequest
<XmlAttribute(AttributeName:="deploymentMode")>
Public Property DeploymentMode As String
<XmlRoot(ElementName:="cXML")>
<XmlElement(ElementName:="Header")>
Public Property Header As Header
<XmlElement(ElementName:="Request")>
Public Property Request As Request
<XmlAttribute(AttributeName:="lang", [Namespace]:="http://www.w3.org/XML/1998/namespace")>
Public Property Lang As String
<XmlAttribute(AttributeName:="timestamp")>
Public Property Timestamp As String
<XmlAttribute(AttributeName:="payloadID")>
Public Property PayloadID As String