• 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 java api guide

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm looking for a quicking breakdown of the java xml api's. specifically sax, xerces, xalan, xml-apis, jdom, etc.
i have an application that's using an xml document, and uses jdom to access it. the xml that we recieve doesn't include a dtd specification, and we add one into the document (direct manipulation of the string). the problem is that the dtd _may_ not always exist at the location we're putting in (we're considering moving from a exploded web app deployment to a ear deployment)
this is what i'm using to get the jdom (i think) representation of the xml document.
SAXBuilder builder = new SAXBuilder( xmlImpl );
builder.setValidation( validate );
return( builder.build( new InputSource( new StringReader( xml ) ) ) );
where xmlImpl=org.apache.xerces.parsers.SAXParser
and validate=false
i'd like to not have to use a dtd within the xml document, so if it's avoidable, that would be excellent. currently the parser seems to not like it if the stated dtd isn't where we've said it's going to be.
 
Nothing up my sleeve ... and ... presto! A tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic