• 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

XML DOM Question

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you're building XML in code for a particular XML structure, are there any shortcuts to building the XML file (like document.CreateXMLFromSchema())?
Since each XML document is different there's always at least one DOM method I'd have to override to build that XML document (to create the nodes).
I'm interested in hearing about how anybody quickly builds an XML file from a DTD/Schema/Data or otherwise (if any of these are faster than manually coding each XML file separately.)
Thanks!!!
-- Mike
 
Ranch Hand
Posts: 400
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with xml spy there is an option to create xml from a db table, although I have not used it.
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would suggest that you have a look at JAXB from Sun (Java Technology & XML). It automatically creates a set of Java classes based on an XML schema definition to allow you to manipulate the XML document as if it is made up of java objects.
As an alternative, if you don't have a full schame then you could have a look at using JDOM (JDOM Home Page) to manipulate the XML elements. It's a lot simpler than using the Xerces API
HTH
Andy Bowes
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic