On Thu, Jan 19, 2012 at 06:39:15PM -0800, ajay bhadauria wrote:
> Hi all,
> 
> I need help in finding the element xpath where schema validation fails. Is 
> there any libxml2 API which could be used to get the xpath of an element in 
> the document which fails schema validation.
> 
> Any help or direction is appriciated.

  Register a structured error handler. Then I think you will usually
get an xmlNodePtr as part oif XSD errors and you can use
xmlGetNodePath() to get an XPath for the node. That won't work however
when streaming XSD as no tree is been built

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to