• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

New to XML

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Nikhil
 
Ranch Hand
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 http://java.sun.com/xml/?frontpage-spotlight.
I hope this helps,
Michael

(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).]
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!