We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,344 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

XPATH

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

2
Contributors
2
Replies
3 Weeks
Discussion Span
1 Month Ago
Last Updated
18
Views
barakros
Newbie Poster
2 posts since Mar 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

what program language should be used
example xslt java ruby

xml_looser
Junior Poster
180 posts since Apr 2009
Reputation Points: 16
Solved Threads: 21
Skill Endorsements: 0

hi, thanks for answering
I use VB.net

barakros
Newbie Poster
2 posts since Mar 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0542 seconds using 2.57MB