This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes how to use DOM Parser 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 use DOM Parser" Watch "how to use DOM Parser" New topic
Author

how to use DOM Parser

vanita maram
Greenhorn

Joined: Aug 06, 2007
Posts: 16
Hi

I am trying to create a program to divide a big xml docuents into smaller xml as the main document file has similar child elements but different values for the elements. Somebody told me to use DOM Parser to do it. I have xmlSpy installed on my machine but that doesnot have any feature which lets me create breaks in the documents. Can somebody please tell me how to use DOM Parser and give a sample code if they have created for the same purpose.

Thanks
Vanita
Prashant Mishra
Greenhorn

Joined: May 05, 2005
Posts: 12
Use a JDOM Parser and some Java programming. I dont know what you are trying to achieve but maybe the following code snippets can help:


Hope this helps.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
You might want to look over Sun's tutorial on XML processing with Java.

Do you want to split each of these specified child elements into a separate document?

Perhaps splitting the document is not the best solution - what are you actually trying to do with the data?

Bill
Raghavan Muthu
Ranch Hand

Joined: Apr 20, 2006
Posts: 3344

Hello vanita maram,

Welcome to JavaRanch!

This Sun's J2EE Tutorial is a very good one which explains step by step approach of using DOM.

Hope this might help you.


Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
vanita maram
Greenhorn

Joined: Aug 06, 2007
Posts: 16
Thanks you guys for helping me out.
 
GeeCON Prague 2014
 
subject: how to use DOM Parser