This is part of an XML file that I need to build programatically. I am building it with the XMLTextWriter object in .NET -- which is a great tool for what I'm doing. The problem is that the nesting in this is so complex and so deep, that it never nests them right and I can never seem to get all of the objects in the right order to get them to nest exactly correct.
Any suggestions?
Any suggestions?
Code:
<OrderDetail>
<ListOfItemDetail>
<ItemDetail>
<PricingDetail>
<ListOfPrice>
<Price>
<UnitPrice>
<UnitPriceValue>450</UnitPriceValue>
<UnitOfMeasurement>
<UOMCoded>EA</UOMCoded>
</UnitOfMeasurement>
</UnitPrice>
<PriceBasisQuantity>
<Quantity>
<QuantityValue>1</QuantityValue>
</Quantity>
</PriceBasisQuantity>
<ValidityDates>
<StartDate>2/25/2005</StartDate>
<EndDate>3/27/2005</EndDate>
</ValidityDates>
</Price>
</ListOfPrice>
<TotalValue>
<MonetaryValue>
<MonetaryAmount>450</MonetaryAmount>
</MonetaryValue>
</TotalValue>
</PricingDetail>
<BaseItemDetail>
<LineItemNum>
<BuyerLineItemNum>12354</BuyerLineItemNum>
</LineItemNum>
<ItemIdentifiers>
<PartNumbers>
<SellerPartNumber>
<PartNum>
<PartID>100-1520</PartID>
</PartNum>
</SellerPartNumber>
</PartNumbers>
<ItemDescription>Backhoe</ItemDescription>
</ItemIdentifiers>
</BaseItemDetail>
</ItemDetail>
</ListOfItemDetail>
</OrderDetail>