<information>
<person>
<address>
<region>
<city>
<ZIP>1701</ZIP>
</city>
</region>
</address>
</person>
<company>
<address>
<region>
<city>
<ZIP>This is not a ZIP Code</ZIP>
</city>
</region>
</address>
</company>
</information>
Above is an example XML element format. And if I validate it to the XSD, this will return an error : "ZIP element is not a valid value of the atomic type 'xs:integer' "
to catch the error, I use libxml_get_errors(). but this cannot return the parent elements where the error occurred. It would be difficult to know if the ZIP error occurred inside OR .
Do you guys know another XML error library to return element error hierarchically? or any other way to achieve something like this? :
" < information >< company >< address >< region >< city > : ZIP is not a valid value of the atomic type 'xs:integer' "
Thank you.