Hi,
I'm relatively new to using XML and to this forum. I have a complex XML file that I need to load into a DataSet so I can work with it - load it to SQL etc. My problem is getting it from the XML file into the DataSet.
On trying to use DataSet1.ReadXml(myxml) I end up with an error like:
- "Nested table 'entityIdentification' which inherits its namespace cannot have multiple parent tables in different namespaces."
How can I get this XML into the dataset - can anyone point me in the right direction please.
My XML file is show below.
Thanks for any help you can give.
<?xml version="1.0" encoding="UTF-8"?>
<sh:StandardBusinessDocument xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:eanucc="urn:ean.ucc:2" xmlns:order="urn:ean.ucc:order:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader ../Schemas/sbdh/StandardBusinessDocumentHeader.xsd urn:ean.ucc:2 ../Schemas/MultiShipmentOrderProxy.xsd">
<sh:StandardBusinessDocumentHeader>
<sh:HeaderVersion>1.0</sh:HeaderVersion>
<sh:Sender>
<sh:Identifier Authority="EAN.UCC">9377776020419</sh:Identifier>
</sh:Sender>
<sh:Receiver>
<sh:Identifier Authority="EAN.UCC">9377776000001</sh:Identifier>
</sh:Receiver>
<sh:DocumentIdentification>
<sh:Standard>EAN.UCC</sh:Standard>
<sh:TypeVersion>2.4</sh:TypeVersion>
<sh:InstanceIdentifier>1234567</sh:InstanceIdentifier>
<sh:Type>MultiShipmentOrder</sh:Type>
<sh:CreationDateAndTime>2008-01-01T12:00:00.000+08:00</sh:CreationDateAndTime>
</sh:DocumentIdentification>
</sh:StandardBusinessDocumentHeader>
<eanucc:message>
<entityIdentification>
<uniqueCreatorIdentification>MSG-1234567</uniqueCreatorIdentification>
<contentOwner>
<gln>9377778020419</gln>
</contentOwner>
</entityIdentification>
<eanucc:transaction>
<entityIdentification>
<uniqueCreatorIdentification>TRA-1234567</uniqueCreatorIdentification>
<contentOwner>
<gln>9377778020419</gln>
</contentOwner>
</entityIdentification>
<command>
<eanucc:documentCommand>
<documentCommandHeader type="ADD">
<entityIdentification>
<uniqueCreatorIdentification>CMD-1234563</uniqueCreatorIdentification>
<contentOwner>
<gln>9377778020419</gln>
</contentOwner>
</entityIdentification>
</documentCommandHeader>
<documentCommandOperand>
<order:multiShipmentOrder creationDateTime="2008-01-01T00:00:00.000+08:00" documentStatus="ORIGINAL">
<contentVersion>
<versionIdentification>2.4</versionIdentification>
</contentVersion>
<documentStructureVersion>
<versionIdentification>2.4</versionIdentification>
</documentStructureVersion>
<orderIdentification>
<uniqueCreatorIdentification>2010X02456789</uniqueCreatorIdentification>
<contentOwner>
<gln>9377778020412</gln>
</contentOwner>
</orderIdentification>
<orderPartyInformation>
<seller>
<gln>9377778000002</gln>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>HHS001</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>BUYER_ASSIGNED_IDENTIFIER_FOR_A_PARTY</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>HARRY'S HARDWARE SUPPLIES</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_1</additionalPartyIdentificationType>
</additionalPartyIdentification>
</seller>
<billTo>
<gln>9325724002019</gln>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>2010</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>BUYER_ASSIGNED_IDENTIFIER_FOR_A_PARTY</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>FREDS BALCATTA W/H</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_1</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>11 BALCATTA ROAD BALCATTA WA 6021</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_2</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9344 4311</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_3</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9345 4311</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_4</additionalPartyIdentificationType>
</additionalPartyIdentification>
</billTo>
<buyer>
<gln>9377778020419</gln>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>FREDS_AU</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>BUYER_ASSIGNED_IDENTIFIER_FOR_A_PARTY</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>FREDS LIMITED</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_1</additionalPartyIdentificationType>
</additionalPartyIdentification>
</buyer>
<orderContact>
<personOrDepartmentName>
<description>
<language>
<languageISOCode>EN</languageISOCode>
</language>
<text>Balcatta Warehouse</text>
</description>
</personOrDepartmentName>
</orderContact>
</orderPartyInformation>
<orderLogisticalInformation>
<shipToLogistics>
<shipTo>
<gln>9325724002019</gln>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>2010</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>BUYER_ASSIGNED_IDENTIFIER_FOR_A_PARTY</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>FREDS BALCATTA W/H</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_1</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>11 BALCATTA ROAD BALCATTA WA 6021</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_2</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9344 4311</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_3</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9345 4311</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_4</additionalPartyIdentificationType>
</additionalPartyIdentification>
</shipTo>
<shipFrom>
<gln>9377778000000</gln>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>WA.WELLINGTON</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>BUYER_ASSIGNED_IDENTIFIER_FOR_A_PARTY</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>HARRY'S HARDWARE DC</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_1</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>29 CORNER ROAD WELLINGTON WA 6545</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_2</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9999 5551</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_3</additionalPartyIdentificationType>
</additionalPartyIdentification>
<additionalPartyIdentification>
<additionalPartyIdentificationValue>08 9999 4414</additionalPartyIdentificationValue>
<additionalPartyIdentificationType>FOR_INTERNAL_USE_4</additionalPartyIdentificationType>
</additionalPartyIdentification>
</shipFrom>
</shipToLogistics>
<orderLogisticalDateGroup>
<requestedDeliveryDate>
<date>2008-01-04</date>
</requestedDeliveryDate>
</orderLogisticalDateGroup>
</orderLogisticalInformation>
<multiShipmentOrderLineItem number="1" >
<requestedQuantity>
<value>5.00</value>
<unitOfMeasure>
<measurementUnitCodeValue>EA</measurementUnitCodeValue>
</unitOfMeasure>
</requestedQuantity>
<netPrice>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>2.50</monetaryAmount>
</amount>
</netPrice>
<netAmount>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>12.50</monetaryAmount>
</amount>
</netAmount>
<tradeItemIdentification>
<gtin>09123456789123</gtin>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>HAM123</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>SUPPLIER_ASSIGNED</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>HAMMER</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_1</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>1</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_2</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
</tradeItemIdentification>
</multiShipmentOrderLineItem>
<multiShipmentOrderLineItem number="2" >
<requestedQuantity>
<value>2.00</value>
<unitOfMeasure>
<measurementUnitCodeValue>EA</measurementUnitCodeValue>
</unitOfMeasure>
</requestedQuantity>
<netPrice>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>12.00</monetaryAmount>
</amount>
</netPrice>
<netAmount>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>24.00</monetaryAmount>
</amount>
</netAmount>
<tradeItemIdentification>
<gtin>09123456789111</gtin>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>DRILL SET</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_1</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>1</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_2</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
</tradeItemIdentification>
</multiShipmentOrderLineItem>
<multiShipmentOrderLineItem number="3" >
<requestedQuantity>
<value>10.00</value>
<unitOfMeasure>
<measurementUnitCodeValue>EA</measurementUnitCodeValue>
</unitOfMeasure>
</requestedQuantity>
<netPrice>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>25.00</monetaryAmount>
</amount>
</netPrice>
<netAmount>
<amount>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>250.00</monetaryAmount>
</amount>
</netAmount>
<tradeItemIdentification>
<gtin>09123456789132</gtin>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>WHEEL BARROW</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_1</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
<additionalTradeItemIdentification>
<additionalTradeItemIdentificationValue>1</additionalTradeItemIdentificationValue>
<additionalTradeItemIdentificationType>FOR_INTERNAL_USE_2</additionalTradeItemIdentificationType>
</additionalTradeItemIdentification>
</tradeItemIdentification>
</multiShipmentOrderLineItem>
<additionalOrderInstruction>
<language>
<languageISOCode>EN</languageISOCode>
</language>
<longText>GDS/INW BALCATTA-COST EXCL GST QUOTE O/NO ON C/NOTE - INV WITH GOODS</longText>
</additionalOrderInstruction>
<totalMonetaryAmountOfOrder>
<currencyCode>
<currencyISOCode>AUD</currencyISOCode>
</currencyCode>
<monetaryAmount>286.50</monetaryAmount>
</totalMonetaryAmountOfOrder>
<orderHeaderIndicator>
<isApplicationReceiptAcknowledgementRequired>true</isApplicationReceiptAcknowledgementRequired>
<isOrderFreeOfExciseTaxDuty>true</isOrderFreeOfExciseTaxDuty>
</orderHeaderIndicator>
</order:multiShipmentOrder>
</documentCommandOperand>
</eanucc:documentCommand>
</command>
</eanucc:transaction>
</eanucc:message>
</sh:StandardBusinessDocument>