Hi All,
I have a need to create an XML file, in a specified format, from a query I have constructed. I am currently printing the data to a report but I need to put in a particular XML format something like this -
Part1 - Customer data
Part2 - Product Code
Part3 - Looping through a table with sub-elements of the product and inserting drilling parameters to be sent to a CNC machine. Example is below.
Thanks,
Milton
<Order>
<CustomerCode>AUSTGEEB</CustomerCode>
<CustomerOrderID>F13456HE4</CustomerOrderID>
<!-- Customer Order ID Must be unique-->
<InvoiceAddress>
<Address>ACCOUNTS PAYABLE</Address>
<Address2>1 MyRoad</Address2>
<Address3></Address3>
<City>MyCity</City>
<PostCode>4034</PostCode>
<State>MyState</State>
<Country>Australia</Country>
</InvoiceAddress>
<OrderNotes>
<OrderNote></OrderNote>
<OrderNote></OrderNote>
</OrderNotes>
<DeliverySchedule>
<DeliveryScheduleNumber>1</DeliveryScheduleNumber>
<DateRequested>2009-03-02</DateRequested>
<DeliveryAddress>
<Address>Rear Loading Dock</Address>
<Address2>MyAddress</Address2>
<Address3></Address3>
<City>MyCity</City>
<PostCode>4034</PostCode>
<State>MyState</State>
<Country>Australia</Country>
</DeliveryAddress>
<DeliveryScheduleNotes>
<DeliveryScheduleNote>This is a Delivery Schedule Note</DeliveryScheduleNote>
</DeliveryScheduleNotes>
<OrderLine>
<LineNumber>1</LineNumber>
<ProductCode>MELDOOR</ProductCode>
<!-- Melamine Door -->
<Quantity>1</Quantity>
<Configuration>
<ConfigurationDetail>
<PanelAttributes>
<Height>720</Height>
<Width>305</Width>
<BoardColour>Indigo Haze</BoardColour>
<EdgeSection>
<Top>
<EdgeType>2mm</EdgeType>
<EdgeColour>Indigo Haze</EdgeColour>
</Top>
<Bottom>
<EdgeType>2mm</EdgeType>
<EdgeColour>Indigo Haze</EdgeColour>
</Bottom>
<Left>
<EdgeType>2mm</EdgeType>
<EdgeColour>Indigo Haze</EdgeColour>
</Left>
<Right>
<EdgeType>2mm</EdgeType>
<EdgeColour>Indigo Haze</EdgeColour>
</Right>
<Inner/>
</EdgeSection>
<Hingeholing/>
<Drilling>
<!-- Offsets are from bottom left in mm-->
<Hole>
<HoleWidth>8.0</HoleWidth>
<XHoleOffset>37</XHoleOffset>
<YHoleOffset>8.5</YHoleOffset>
<HoleDepth>16</HoleDepth>
</Hole>
<Hole>
<HoleWidth>8.0</HoleWidth>
<HoleDepth>16</HoleDepth>
<XHoleOffset>261</XHoleOffset>
<YHoleOffset>8.5</YHoleOffset>
</Hole>
<Hole>
<HoleWidth>8.0</HoleWidth>
<HoleDepth>16</HoleDepth>
<XHoleOffset>296.5</XHoleOffset>
<YHoleOffset>52</YHoleOffset>
</Hole>
<Hole>
<HoleWidth>8.0</HoleWidth>
<HoleDepth>16</HoleDepth>
<XHoleOffset>296.5</XHoleOffset>
<YHoleOffset>668</YHoleOffset>
</Hole>
<Hole>
<HoleWidth>8.0</HoleWidth>
<HoleDepth>16</HoleDepth>
<XHoleOffset>37</XHoleOffset>
<YHoleOffset>711.5</YHoleOffset>
</Hole>
<Hole>
<HoleWidth>8.0</HoleWidth>
<HoleDepth>16</HoleDepth>
<XHoleOffset>261</XHoleOffset>
<YHoleOffset>711.5</YHoleOffset>
</Hole>
<Hole>
<HoleWidth>5.0</HoleWidth>
<HoleDepth>12.5</HoleDepth>
<XHoleOffset>37</XHoleOffset>
<YHoleOffset>72</YHoleOffset>
</Hole>