I have an xml file sometimes an element contains a multiplied attribute (not an ID) and he has the same value, something like this :
<names>
<name attribute="abc" attribute="abc" />
</names>
I know this is a false writing, so I want to ignore the error when I read the file in Php with this code :
$xmlDoc->load( 'file.xml' );
It's possible ?
Thank you.
Pass some options while loading:
$xmlDoc->load('file.xml', LIBXML_NOERROR | LIBXML_NOWARNING);
And the standard http://www.php.net/manual/de/function.libxml-use-internal-errors.php