planetbluau
Programmer
Hi,
I know that this is possibly not a real issue, however I am trying to write a vb.NET application using LINQ to XML and match an existing applications (for which I don't have the source code) output.
The XML output I am trying to match is:
However when I use my code, regardless of the order of the code entries I get:
Here is a snippet from my code that produces this part of the XML:
How can I change the order of the output?
Thanks,
Rodney
I know that this is possibly not a real issue, however I am trying to write a vb.NET application using LINQ to XML and match an existing applications (for which I don't have the source code) output.
The XML output I am trying to match is:
XML:
<sh:StandardBusinessDocument xmlns:sh="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"[/URL] xmlns:eanucc="urn:ean.ucc:2" xmlns:pay="urn:ean.ucc:pay:2" xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xsi:schemaLocation="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader[/URL] ../Schemas/sbdh/StandardBusinessDocumentHeader.xsd urn:ean.ucc:2 ../Schemas/InvoiceProxy.xsd">
</sh:StandardBusinessDocument>
However when I use my code, regardless of the order of the code entries I get:
XML:
<sh:StandardBusinessDocument xsi:schemaLocation="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader../Schemas/sbdh/StandardBusinessDocumentHeader.xsd[/URL] urn:ean.ucc:2 ../Schemas/InvoiceProxy.xsd" xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance"[/URL] xmlns:pay="urn:ean.ucc:pay:2" xmlns:eanucc="urn:ean.ucc:2" xmlns:sh="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">[/URL]
</sh:StandardBusinessDocument>
Here is a snippet from my code that produces this part of the XML:
Code:
Dim sSchemaLocation As String = "[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader[/URL] ../Schemas/sbdh/StandardBusinessDocumentHeader.xsd urn:ean.ucc:2 ../Schemas/InvoiceProxy.xsd"
Dim newPO As XDocument = _
<?xml version="1.0" encoding="UTF-8"?>
<sh:StandardBusinessDocument xsi:schemaLocation="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader../Schemas/sbdh/StandardBusinessDocumentHeader.xsd[/URL] urn:ean.ucc:2 ../Schemas/InvoiceProxy.xsd"
xmlns:sh="[URL unfurl="true"]http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader"[/URL] xmlns:eanucc="urn:ean.ucc:2" xmlns:pay="urn:ean.ucc:pay:2" xmlns:xsi="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema-instance">[/URL]
</sh:StandardBusinessDocument>
How can I change the order of the output?
Thanks,
Rodney