We help IT Professionals succeed at work.

xmdocument, aspx, net

ITsolutionWizard
ITsolutionWizard asked
on
Below codes, how can get <NetPrice>? In this case 226.00


<Status>Completed</Status>
                <CustomerNumber>335281</CustomerNumber>
                <OrderDate>04-10-15</OrderDate>
                <OrderDetail>
                <Item id="0">
                <Model><![CDATA[AAS3602I]]></Model>
                <Quantity>1</Quantity>
                <DealerPrice>226.000</DealerPrice>
                <NetPrice>226.000</NetPrice>
               </Item>
                </OrderDetail>


 XmlDocument xml = new XmlDocument();
 xml.LoadXml(d.GetData());

 string status = xml.SelectSingleNode("//Status").InnerXml;
Comment
Watch Question

To get the NetPrice value:
string status = xml.SelectSingleNode( "//OrderDetail/Item/NetPrice" ).InnerXml;

Open in new window