This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes how to get the child nodes in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "how to get the child nodes in java" Watch "how to get the child nodes in java" New topic

how to get the child nodes in java

muthu bharathi
Ranch Hand

Joined: Dec 10, 2008
Posts: 97

i have the xml like the following:

from the above xml i need the values such as block1,block2, block3 itself. how can i get it by using java.
it is very urgent... im awaiting for your response.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13000
How far have you gotten with this problem?

1. can you parse the source XML into a DOM?
2. have you familiarized yourself with the Java methods for manipulating a DOM? (hint - see the JavaDocs for the org.w3c.dom.Node class for an overview of what you can do with the various node types)

See the free online book by Harold for tutorials and examples close to your problem.


Have you checked out Aspose?
subject: how to get the child nodes in java
It's not a secret anymore!