Tom Sage
asked on
XML - Using Xdocument to read the XML - I want to skip nodes that are Parent nodes
Here is a sample of XML
When I get the value of Parent nodes, like "Pricing" , I get all of the values of the Children nodes.
How can I test for this kind of node ?
Thank you
<Auto>
<Model>FORD</Model>
<ModelYear>2013</ModelYear>
<ModelDescription>PICKUP</ModelDescription>
<Make>F-150</Make>
<SaleClass>NEW</SaleClass>
<VIN>5N1995512300</VIN>
<DeliveryMileage uom="M">1000</DeliveryMileage>
<AutoStock>DT</AutoStock>
<BodyStyle>PICKUP</BodyStyle>
<ExteriorColor>WHITE</ExteriorColor>
<Pricing>
<AutoPrice currency="USD">20000.34</AutoPrice>
<AutoPricingType>Net Cap Cost</AutoPricingType>
</Pricing>
<Pricing>
<AutoPrice currency="USD">21000.89</AutoPrice>
<AutoPricingType>Gross Cap Cost</AutoPricingType>
</Pricing>
<CollateralType>C</CollateralType>
<NumberOfEngineCylinders>8</NumberOfEngineCylinders>
<VanConversionCost>0.00</VanConversionCost>
<AutoUse>Personal</AutoUse>
</Auto>
When I get the value of Parent nodes, like "Pricing" , I get all of the values of the Children nodes.
How can I test for this kind of node ?
Thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not a problem Tom, glad to help.
ASKER
It is still strange that the Parent would show all the Children values.
Thanks for the quick response.