#47953 [Bgs]: Error reading XML string

2009-04-21 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I don't know why this issue was clasified as bogus, because its a PHP
error.

I wrote again the code to generate the XML that is read it in other
company without problem, but when I try to read it, I'm receiving the
same error reported before.

There are not hidden characters that I put like Richards wrote before.

Please help me with this problem

// Crea objeto XML
$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();


Previous Comments:


[2009-04-15 17:46:42] bbarnett at gt dot co dot cr

Excuse too many questions, but I need to resolve this.

if is this true, why if is the same provider for this string in one
case works and in the other none???

Thank's for your help :)



[2009-04-15 17:10:14] rricha...@php.net

Not a bug. You have bad data - most likely an invisible char.



[2009-04-15 15:58:53] bbarnett at gt dot co dot cr

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655




[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47953

-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

Excuse too many questions, but I need to resolve this.

if is this true, why if is the same provider for this string in one
case works and in the other none???

Thank's for your help :)


Previous Comments:


[2009-04-15 17:10:14] rricha...@php.net

Not a bug. You have bad data - most likely an invisible char.



[2009-04-15 15:58:53] bbarnett at gt dot co dot cr

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655




[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47953

-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread rrichards
 ID:   47953
 Updated by:   rricha...@php.net
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

Not a bug. You have bad data - most likely an invisible char.


Previous Comments:


[2009-04-15 15:58:53] bbarnett at gt dot co dot cr

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655




[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/47953

-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I'm adding the XML head to the string like this



  2
  7901160655
  9726
  79613565
  5
  010605
  1400
  20090102
  20090105

But I'm receiving the same result. 

In the next case the function read the XML without problem


  7901160655



Previous Comments:


[2009-04-15 15:40:06] bbarnett at gt dot co dot cr

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?



[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1



#47953 [Bgs]: Error reading XML string

2009-04-15 Thread bbarnett at gt dot co dot cr
 ID:   47953
 User updated by:  bbarnett at gt dot co dot cr
 Reported By:  bbarnett at gt dot co dot cr
 Status:   Bogus
 Bug Type: SimpleXML related
 Operating System: WXP
 PHP Version:  5.2.9
 New Comment:

I try without the utf8_decode, but I'm receiving the same result.

$xml2= simplexml_load_string(trim($reg[0]));

Can you help me?


Previous Comments:


[2009-04-15 11:55:16] rricha...@php.net

There's bad data somewhere in your XML. No idea what encoding the data

is, but converting it to ISO-8859-1 without an XML declaration using 
that encoding is a sure path to disaster.



[2009-04-12 00:07:46] bbarnett at gt dot co dot cr

This is a part of the code that I'm using:
",1);
} 
?>



[2009-04-12 00:03:21] bbarnett at gt dot co dot cr

This is an example of the XML string that I'm trying to read

  2
  8203261610
  9770
  80782584
  9
  011930
  1400
  20090216
  20090217




[2009-04-11 23:49:39] bbarnett at gt dot co dot cr

Description:

I'm receiving and error when I try to read and XML string. The error
is: Premature end of data in tag FechaPago line 9 Line: 9

Reproduce code:
---
$xml2= simplexml_load_string(utf8_decode(trim($reg[0])));

Expected result:

An XML object

Actual result:
--
An Error.





-- 
Edit this bug report at http://bugs.php.net/?id=47953&edit=1