1,105,295 Community Members

XPATH

Member Avatar
barakros
Newbie Poster
2 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
1
 

hi
I need some help.
I have XML file with the folowing structure, and I wanted to know if there is a way to
get some FLD nodes from a LIN Node in 1 XPATH command so I can get these values in 1 command.
I need just the first FLD and the third FLD. and I want to get the XPathNodeIterator to iterate 3 times.
since there are 3 lines.
what is the way to do?

<TAB DIM="200" ID="POH2_1" SIZE="3" >
        <LIN NUM="1" >
            <FLD NAME="ITMREF" TYPE="Char" >ABC</FLD>
            <FLD NAME="LINAMT" TYPE="Decimal" >200</FLD>
            <FLD NAME="QTYUOM" TYPE="Decimal" >10</FLD>
            <FLD NAME="PUU" TYPE="Char" >EA</FLD>         
        </LIN>
        <LIN NUM="2" >           
            <FLD NAME="ITMREF" TYPE="Char" >DEF</FLD>
            <FLD NAME="LINAMT" TYPE="Decimal" >300</FLD>
            <FLD NAME="QTYUOM" TYPE="Decimal" >30</FLD>
            <FLD NAME="PUU" TYPE="Char" >EA</FLD>
        </LIN>
        <LIN NUM="3" >
            <FLD NAME="ITMREF" TYPE="Char" >XYZ</FLD>
            <FLD NAME="LINAMT" TYPE="Decimal" >500</FLD>
            <FLD NAME="QTYUOM" TYPE="Decimal" >40</FLD>
            <FLD NAME="PUU" TYPE="Char" >EA</FLD>
        </LIN>
</TAB>

thanks
Barak

Member Avatar
xml_looser
Junior Poster
194 posts since Apr 2009
Reputation Points: 3 [?]
Q&As Helped to Solve: 21 [?]
Skill Endorsements: 0 [?]
 
0
 

what program language should be used
example xslt java ruby

Member Avatar
barakros
Newbie Poster
2 posts since Mar 2013
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

hi, thanks for answering
I use VB.net

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article