This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • 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
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!