Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XmlBeans Validation

 
RabindraBlr Sahoo
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am validating xml by validate() function provided by XmlBeans. But in my xml there are some tags which are not mentioned in xsd(Schema).
I am able to parse properly with the unwanted tag using XmlObject.Parse(), but the validation fails.

Is there any way to validate only the required tag present in XSD and skipping the unwanted tag.

Thanks in Advance!

Cheers,
Rabindra
 
Paul Clapham
Sheriff
Pie
Posts: 20716
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. The purpose of validating a document against a schema is to ensure that the document has the structure that the schema says it should. Either it does or it doesn't.

So what is the underlying problem here? Are people sending you documents which don't match the schema? If so, send them back and get them to fix the documents. Perhaps some training is needed for those people? Or perhaps they need a better tool to prevent them from making these errors?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic