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("dfageRoot/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>
"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("dfageRoot/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>