File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes JIBX validate the structure of input xml file before unmarsalling it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JIBX validate the structure of input xml file before unmarsalling it?" Watch "JIBX validate the structure of input xml file before unmarsalling it?" New topic
Author

JIBX validate the structure of input xml file before unmarsalling it?

dong zhang
Greenhorn

Joined: Dec 24, 2010
Posts: 2
1. The validation is mainly validate the structure of input xml file. I need to qulify whether the xml has a correct format for parsering.

2. Besides, I need to print the error message for the error elements in xml file.

I serach some method that use XSD to validate xml file. But, I don't know how to implement it.

Thanks.




kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
JIBX does not support Schema validation. If you want strict Schema validation, then use JAXB / XML Beans data binding frameworks.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
There is no reason you could not read the file twice, once for validation and then again with JIBX.

Check out the javax.xml.validation package.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JIBX validate the structure of input xml file before unmarsalling it?
 
Similar Threads
xml validation agains xsd
Doubt on DTD
Question on JAXB Validation
how to validate xml by using external dtd
what's XML parser?