File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Sample Code For DOM 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 "Sample Code For DOM" Watch "Sample Code For DOM" New topic

Sample Code For DOM

Raghuraman Muthuswamy
Ranch Hand

Joined: Mar 18, 2003
Posts: 73
Hello All,
I just need a simple DOM Parser Code just to kick start my understanding of DOM Parsing using Java. Your help is very much appreciated.

Thanks in advance,
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Go to IBM developers website, then click XML, then xml tutorials or articles, there you will find bunches of article/tutorials on xml, dom, sax, xslt,fop,databinging etc., Try to find the tutorial "Understaning DOM" in it.

Spritle Software Blogs
Bajji Pat
Ranch Hand

Joined: Apr 05, 2005
Posts: 50
Hi Raghu,

Pls find the code below (just covering the basic requirements)

Hope this is useful.

Bajji Pat

Edit Comment:
Added the [ code ] and [ / code ] tags without he spaces.

- m
[ April 12, 2005: Message edited by: Madhav Lakkapragada ]
Raghuraman Muthuswamy
Ranch Hand

Joined: Mar 18, 2003
Posts: 73
Hi Balaji and Bajji,
Thanks for your reply. Both of your replies are useful to me. Can you explain me about Namespaces in XML its a bit confusing to me. If you explain me about namespace in simple terms it will be useful.

With regards,
I agree. Here's the link:
subject: Sample Code For DOM
It's not a secret anymore!