• 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

Writing a DOM parser.

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I have been assigned a project on writing the XML DOM parser.
Can anybdy give me directions as to how I should go bout doing it.
I have posted this question bfor,but recieved no replies...
Thanks,
Chinmay.
 
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please look at the second item at the begining of this thread and you can find sample code in the DOM API section. You can simply copy-paste that stuff and see it working. You need to have the JVM and all the classpath stuff setup on ur m/c. Then you can go thru the stuff and try to figure out how i'm using the API. I don't think that i'm doing it efficiently (didn't pay attention to that part)from the programming point of view, but that should give you a good head-start to using the API.
https://coderanch.com/t/146704/po/certification/Fresher-help
 
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
If you need to make that parser compatible with the W3C specification of the DOM, you better start by looking at the interfaces in the org.w3c.dom package as found in the JAXP parser documentation.
Bill
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OOPS! Sorry i misread the original question. The stuff i gave is how to use the ready-made Java implementation of the DOM API given by W3C. You can have a look at the interfaces needed to be supported and all that stuff at the link below (the stuff that Bill was mentioning)
http://java.sun.com/xml/jaxp/dist/1.1/docs/api/org/w3c/dom/package-summary.html
 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks William & Jayadev for ur replies.
I was looking at the IDL's at the W3c sie and was finding them much hard to understand.The JAXP link makes things much easier to understand.
I even tried to look at the Xerces code,but felt lost.Any idea bout how to go on and understand the design and class structure?
Thanks,
Chinmay.
 
reply
    Bookmark Topic Watch Topic
  • New Topic