Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML XmlNamespaceManager selecting

Status
Not open for further replies.

Dashley

Programmer
Dec 5, 2002
925
US
I've run into an xml documnet that has multiple nodes called
"line item ".

I'm trying to reference them in a document using a namespace manager.

I can find the first one using
"DirectCast(xmldoc.SelectSingleNode("df:pageRoot/df:BodyMain/df:RateQuote/df:LineItem", mgr), XmlElement).InnerText.ToString"

I can't figure out how to reference the TYPE="Codeword" and its subsequent description. If I wanted to grab the Rate (below) 3030
how do I construct the direct cast call to read it?


Thanks!


- <LineItem Type="CodeWord">
<Description>GENERAL SURCHARGE (FUEL/FRT)</Description>
<Code>FSC</Code>
<Quantity />
<Rate>3030</Rate>




Partial XML bellow

- <LineItem Type="CodeWord">
<Description>PERCENT DISCOUNT</Description>
<Code>DISC</Code>
<Quantity />
<Rate>82.00</Rate>
<Charges>81242</Charges>
<Terms>P</Terms>
<OverrideAmt />
<OverrideAmtCurrency />
<OverrideAmtConvertInd />
<OverrideAmtConvertExRate />
<RateUOM />
<RatePerUOM />
<MinMaxInd />
<CreditInd>-</CreditInd>
<CalcMethod />
<CalcMethodBasis />
<Disposition>2</Disposition>
<OverrideDisposition />
<SourceCode>R</SourceCode>
</LineItem>
- <LineItem Type="CodeWord">
<Description>GENERAL SURCHARGE (FUEL/FRT)</Description>
<Code>FSC</Code>
<Quantity />
<Rate>3030</Rate>
<Charges>5404</Charges>
<Terms>P</Terms>
<OverrideAmt />
<OverrideAmtCurrency />
<OverrideAmtConvertInd />
<OverrideAmtConvertExRate />
<RateUOM>%</RateUOM>
<RatePerUOM>NRVA</RatePerUOM>
<MinMaxInd />
<CreditInd>+</CreditInd>
<CalcMethod />
<CalcMethodBasis />
<Disposition>2</Disposition>
<OverrideDisposition />
<SourceCode>B</SourceCode>
</LineItem>
- <LineItem Type="CodeWord">
<Description>TOTAL/SUBTOTAL BILLED CHARGES</Description>
<Code>TTL</Code>
<Quantity>1250</Quantity>
<Rate />
<Charges>23238</Charges>
<Terms>P</Terms>
<OverrideAmt />
<OverrideAmtCurrency />
<OverrideAmtConvertInd />
<OverrideAmtConvertExRate />
<RateUOM />
<RatePerUOM />
<MinMaxInd />
<CreditInd>+</CreditInd>
<CalcMethod />
<CalcMethodBasis />
<Disposition>2</Disposition>
<OverrideDisposition />
<SourceCode>R</SourceCode>
</LineItem>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top