File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in getting xpath of each node.

Aditi Gandy
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to get xpath of each element in xml document.
I have written the code, but the last element's number is
getting incremented where i want that to start from [0].

Can anyone please help me?

My code as follows:

my java program is:

I need to read xml data and put it on the browser. I thought frist i will get xpath of all the elements and get its value calling xpath from my another java program.

Is there any better way to do it ? please suggest me?!

Please help
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic