This was actually not a bug with the PHP code.
The error was in the instance XML document.
I just closed the bug.
The contents of the element node did not conform to what is specified in
the XSD. After adjusting the contents of the instance XML document to
conform to the specifications of the XSD document, it worked as expected.
The original file is here :
http://israelekpo.com/php_bugs/NFe/4309080311661100019855001000000001070
0000127.xml
The corrected version is here :
http://israelekpo.com/php_bugs/NFe/4309080311661100019855001000000001070
0000127.correct.xml
PHP Code to verify success :
http://israelekpo.com/php_bugs/NFe/bug_49325.phps
<?php
$xml = new DomDocument();
$xml->load('43090803116611000198550010000000010700000127.correct.xml');
$tempDom = new DOMDocument();
$tempDom->loadXML(utf8_encode($xml->saveXML()));
if ($tempDom->schemaValidate('nfe_v1.10.xsd'))
{
echo "ok";
} else {
echo "erro";
}
?>
Expected result:
ok
Actual result:
ok
--
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
This was actually not a bug with the PHP code.
The error was in the instance XML document.
I just closed the bug.
That should probably be closed as "bogus", not "closed".
- David
On Mon, Oct 5, 2009 at 12:52 PM, David Zülke
david.zuelke@bitextender.comwrote:
This was actually not a bug with the PHP code.
The error was in the instance XML document.
I just closed the bug.
That should probably be closed as "bogus", not "closed".
- David
Thanks David.
It will do that.
--
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.