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 New to XML 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 "New to XML" Watch "New to XML" New topic

New to XML

Trader Joey
Ranch Hand

Joined: May 11, 2000
Posts: 33
I have an application that sends XML data in a string format. I need to decode this data to form java objects. I have the DTD for the XML. how do i proceed ? Please help.
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
I am new to xml myself but have achieved what you are asking. I used SAX to instantiate my object in the startDocument() method, then populated instance variables by using the endElement() method.
I have no idea if this is a good approach, but it works. It was sort-of built off the tutorial for JAXP 1.1, early access 2. The java xml stuff is at
I hope this helps,

(a few minutes later...)
I just went to that site and saw that JAXP 1.1 final was released earlier this month. I would imagine that's the API to use.
[This message has been edited by Michael Hildner (edited February 27, 2001).]
I agree. Here's the link:
subject: New to XML
It's not a secret anymore!