Would someone please let me know how I can validate an XML file against its
XSD Schema file.  If there are validation errors I would then like to
extract the human readable error description.

You can find an example implementation here:
http://wiki.njh.eu/XML-Schema_validation_with_libxml2

It's up to you how you supply the schema URI to libxml (i.e. a noNamespaceSchemaLocation/shemaLocation attribute of the root element or some other mechanism). Because XSD is a specification separate from XML, libxml won't extract the URI for you.

Good luck!
Piotr
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to