• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to use DOM Parser

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
vanita maram
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks you guys for helping me out.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic