From: bbarnett at gt dot co dot cr
Operating system: Windows 2003 Server R2
PHP version: 5.2.9
PHP Bug Type: DOM XML related
Bug description: Error reading XML string
Description:
------------
I'm receiving and errors when I try to read and XML string, previously
generated by my code.
Reproduce code:
---------------
$doc = new DOMDocument('1.0'); $doc->formatOutput = true;
$root = $doc->createElement('X_A_PagoGen'); $root =
$doc->appendChild($root);
$title = $doc->createElement('Banco'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($codigobanco)); $text =
$title->appendChild($text);
$title = $doc->createElement('Localizacion'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($localizacion)); $text =
$title->appendChild($text);
$title = $doc->createElement('NotaCredito'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($remesa),12,'0','derecha')); $text =
$title->appendChild($text);
$title = $doc->createElement('Correlativo'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($factura));
$text = $title->appendChild($text);
$title = $doc->createElement('Self'); $title = $root->appendChild($title);
$text = $doc->createTextNode(trim($self)); $text =
$title->appendChild($text);
$title = $doc->createElement('Monto'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(llenacampo(trim($monto),10,'0','derecha')); $text =
$title->appendChild($text);
$title = $doc->createElement('Agencia'); $title =
$root->appendChild($title); $text =
$doc->createTextNode(trim($recaudadorCNFL)); $text =
$title->appendChild($text);
$title = $doc->createElement('FechaPago'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim(fecha1()));
$text = $title->appendChild($text);
$title = $doc->createElement('FechaCaja'); $title =
$root->appendChild($title); $text = $doc->createTextNode(trim($deposito));
$text = $title->appendChild($text);
$tramaxml=$doc->saveXML();
$xml2= simplexml_load_string(trim($tramaxml));
Expected result:
----------------
XML Object
Actual result:
--------------
Error:
Fatal Error 73: Couldn't find end of Start Tag Fech line 10 Line: 10
Column: 8
Fatal Error 77: Premature end of data in tag X_A_PagoGen line 2 Line: 10
Column: 8
--
Edit bug report at http://bugs.php.net/?id=48096&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48096&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48096&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48096&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48096&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48096&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48096&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48096&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48096&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48096&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48096&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48096&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48096&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48096&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48096&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48096&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48096&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48096&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48096&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48096&r=mysqlcfg