Results 1 to 2 of 2
- 07-14-2010, 06:15 AM #1
Member
- Join Date
- Jul 2010
- Posts
- 1
- Rep Power
- 0
How to get complete child nodes of an xml
Hi,
I am trying to parse an xml something like this given below.
<root>
<child1>
<sub1-child1>text</sub1-child1>
<sub1-child2>text</sub1-child2>
<sub1-child3>text</sub1-child3>
</child1>
<child2>
<sub2-child1>text</sub2-child1>
<sub2-child2>text</sub2-child2>
<sub2-child3>text</sub2-child3>
</child2>
<child3>
<sub3-child1>text</sub3-child1>
<sub3-child2>text</sub3-child2>
<sub3-child3>text</sub3-child3>
</child3>
</root>
If I am asking for the parser to get <child1> then I expect the output should be like this given below:
<child1>
<sub1-child1>text</sub1-child1>
<sub1-child2>text</sub1-child2>
<sub1-child3>text</sub1-child3>
</child1>
I dont want to get a nodelist for looping for all the sub child elements. But i saw DOM parser which is used only for getting one by one child element. I am not getting all the sub child elements along with the child element if i query for a child element.
I hope you got my point and let me know your thoughts on this. Thanks for your help in Advance.
- 07-14-2010, 08:58 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Similar Threads
-
Getting handler of child window
By jhyd in forum AWT / SwingReplies: 0Last Post: 06-23-2010, 04:17 PM -
How to get value of specific child node
By sito42 in forum New To JavaReplies: 1Last Post: 07-13-2009, 12:00 PM -
Cannot add or update a child row....
By Pierced1 in forum JDBCReplies: 2Last Post: 06-29-2009, 02:32 AM -
nodes
By Dr Gonzo in forum New To JavaReplies: 1Last Post: 12-08-2008, 04:22 PM -
Child Labor
By freddieMaize in forum Forum LobbyReplies: 1Last Post: 11-16-2008, 08:59 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks