ID: 41792 Updated by: [EMAIL PROTECTED] Reported By: alexander dot krause at erazor-zone dot de -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: Linux PHP Version: 5.2.3 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The newlines in the attribute values are being normalized: http://www.w3.org/TR/REC-xml/#AVNormalize Previous Comments: ------------------------------------------------------------------------ [2007-06-24 19:39:38] alexander dot krause at erazor-zone dot de Description: ------------ newlines in attributes are allowed (htmlentities also does not convert newlines to ) but they'll be removed when using simplexml. Reproduce code: --------------- $xml = new SimpleXMLElement( '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><str val="Line 1 Line2 Line3"/>' ); echo $xml->asXML(); Expected result: ---------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <str val="Line 1 Line2 Line3"/> Actual result: -------------- <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <str val="Line 1 Line2 Line3"/> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41792&edit=1
