note 68030 added to function.dom-domdocument-loadxml

From: Date: Tue, 11 Jul 2006 00:36:06 +0000
Subject: note 68030 added to function.dom-domdocument-loadxml
Groups: php.notes 
Request: Send a blank email to php-notes+get-114646@lists.php.net to get a copy of this message
This method is kind of stupid in that if there is any leading white space before the <?xml version='1.0'?> like so: <?xml version='1.0'?> <sometag> <anothertag>lame</anothertag> </sometag> it will barf with: Warning: DOMDocument::loadXML() [function.loadXML]: XML declaration allowed only at the start of the document in Entity, line: 1 in foo.php on line 69 To get around this annoyance, do this: $myDOM->LoadXML(trim($xmlstring)); ---- Server IP: 66.163.161.117 Probable Submitter: 67.105.193.226 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-loadxml.php Edit -- http://master.php.net/note/edit/68030 Del: integrated -- http://master.php.net/note/delete/68030/integrated Del: useless -- http://master.php.net/note/delete/68030/useless Del: bad code -- http://master.php.net/note/delete/68030/bad+code Del: spam -- http://master.php.net/note/delete/68030/spam Del: non-english -- http://master.php.net/note/delete/68030/non-english Del: in docs -- http://master.php.net/note/delete/68030/in+docs Del: other reasons-- http://master.php.net/note/delete/68030 Reject -- http://master.php.net/note/reject/68030 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114646) next »