Re: [xml] Validating XML file against XSD Schema
- From: Piotr Sipika <piotreks optonline net>
- To: andrew hartley bcs org uk
- Cc: xml gnome org
- Subject: Re: [xml] Validating XML file against XSD Schema
- Date: Thu, 06 May 2010 09:24:16 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]