• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get element name using parsing

 
lee chan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm very new to parsing...Please help me out in this concern...

I've an xml called example.xml

<Element>
<Program>
<A1>
<Name>Zinkoch</Name>
<Sub>Java</Sub>
</A1>
<A2>
<Name>Lewis</Name>
<Sub>C</Sub>
</A2>
</Program>
<Leave>
<Month1>
<Day>Friday</Day>
</Month1>
<Month2>
<Day>Tuesday</Day>
</Month2>
</Leave>
</Element>


Now by using XPATH or DOM or SAX I want to get elements <A1>, <A2> and the corresponding <Sub> values...
let me know how to do.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This free online book by Harold is loaded with useful examples including some similar to your problem.


Bill
 
lee chan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:This free online book by Harold is loaded with useful examples including some similar to your problem.


Bill


Thank you William...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic