This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML validation common mistakes question

 
Adam Teg
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any guess why an DocumentBuilder parses an XML fine but it does not catch the schema contraint error. When I put a malformed xml it catches the problem. But when I remove a required attribute it is fine. I have setAttribute with XMLSchema and XSD. Please hint on common mistakes.

Thanks
 
Paul Clapham
Sheriff
Pie
Posts: 20185
26
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's probably because you aren't telling the parser to validate against your schema, or if you are then you aren't doing it correctly.

I haven't used schemas myself but the Ranch has an XML FAQ page. There are links about validating against schemas there, so check them out.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic