Results 1 to 2 of 2
- 02-03-2010, 10:21 AM #1
Member
- Join Date
- Feb 2010
- Posts
- 2
- Rep Power
- 0
Finding the Xpath of xml document with index
Hi!
I'm a newbie poster.
I'm working with java and xml. I want to find the path of an xml document with index. In this xml,
<folks>
<person>
<name>fgfg</name>
<phone>999555-8888</phone>
<email>b@xyz.net</email>
</person>
<person>
<name>saran</name>
<name>SM</name>
<phone>213545697</phone>
<email>indu@abc.com</email>
</person>
</folks>
I have to find the unique xpath for an xml file so that i can insert any new node into the exact path.
So, if the xpath is with some index such as,
/folks[0]
/folks[0]/person[0]
/folks[0]/person[0]/name[0]
/folks[0]/person[0]/phone[0]
/folks[0]/person[0]/email[0]
/folks[0]/person[1]
/folks[0]/person[1]/name[0]
/folks[0]/person[1]/name[1]
/folks[0]/person[1]/phone[0]
/folks[0]/person[1]/email[0]
Can anyone suggest an idea for it?
Thanks in advance.Last edited by indus; 02-04-2010 at 07:47 AM.
- 02-05-2010, 10:41 AM #2
Member
- Join Date
- Feb 2010
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
XPATH - Print xml document
By luca.santaniello in forum New To JavaReplies: 0Last Post: 12-17-2009, 10:46 AM -
Validate document starting at xpath
By sarcasteak in forum Advanced JavaReplies: 1Last Post: 04-16-2009, 01:22 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks