This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
 
friki data migration
Ranch Hand
Posts: 772
1
  • 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
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!