• 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

Argh! Help! Want to use DOM, Schema, Factory to Validate! how?

 
Ranch Hand
Posts: 387
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to use the Java XML API so that I can pop in and out different implementations of XML parsers as I need/want to. However, as far as I can tell, if I want Xerces to validate an XML document with a Schema, I CANNOT use the DocumentBuilderFactory method. Is this correct? As far as I can tell, the only way to make it use a schema for validation is by setting certain parser features such as "http://apache.org/xml/features/validation/schema" and this can only be done on either a SAX Parser or Xerces' DOMParser, which you MUST refer to explicitly by name to use "setFeature" since setFeature is not part of the DOM interface.
Does anyone know if there's a way around this? Can I actually use the following and make it use an XML Schema?

If not, then what was the purpose of the above interface?!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic