note 76894 added to ref.simplexml

From: Date: Sat, 04 Aug 2007 02:40:42 +0000
Subject: note 76894 added to ref.simplexml
Groups: php.notes 
Request: Send a blank email to php-notes+get-129166@lists.php.net to get a copy of this message
If you're handling lots of HTML or mixed-content XML you'll probably want to use the DOM functions instead of SimpleXML. Take this for example: <?php $html = new SimpleXMLElement('<div><p>Some text, <a href="#">a link,</a> more text</p></div>'); echo $html->p->a,"<br>\n"; // "a link," echo $html->p; // "Some text, more text" (!) ?> In the above example reconstructing the original markup is impossible because of the way SimpleXML represents the data. ---- Server IP: 194.145.210.3 Probable Submitter: 87.254.65.32 ---- Manual Page -- http://www.php.net/manual/en/ref.simplexml.php Edit -- https://master.php.net/note/edit/76894 Del: integrated -- https://master.php.net/note/delete/76894/integrated Del: useless -- https://master.php.net/note/delete/76894/useless Del: bad code -- https://master.php.net/note/delete/76894/bad+code Del: spam -- https://master.php.net/note/delete/76894/spam Del: non-english -- https://master.php.net/note/delete/76894/non-english Del: in docs -- https://master.php.net/note/delete/76894/in+docs Del: other reasons-- https://master.php.net/note/delete/76894 Reject -- https://master.php.net/note/reject/76894 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#129166) next »