Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
    Bookmark Topic Watch 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis
  • Mark post as helpful
  • send pies
  • Report post to moderator
First of all, make sure that your XML parser supports schema validation. Not all do, yet.

Note that by adapting the first setAttribute call this code can also validate against a DTD or Relax-NG schema. Consult JavaDoc:javax.xml.XMLConstants for the corresponding attribute value.

Here's a quick sample for schema validation using JAXP 1.2.




XmlFaq CategoryCodeSamples
 
I would challenge you to a battle of wits, but I see you are unarmed - shakespear. Unarmed tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!