note 55243 added to function.xml-parse-into-struct

From: Date: Thu, 28 Jul 2005 12:06:48 +0000
Subject: note 55243 added to function.xml-parse-into-struct
Groups: php.notes 
Request: Send a blank email to php-notes+get-92629@lists.php.net to get a copy of this message
The array generated from XML stores not only the elements but also any spaces and linebreaks between the tags. This results in a much longer array. (I had 24 array fields instead of 10!) To cure this use the following code when creating the parser: <?php $xml_parser = xml_parser_create(); xml_parser_set_option($xml_parser,XML_OPTION_SKIP_WHITE,1); ?> ---- Manual Page -- http://www.php.net/manual/en/function.xml-parse-into-struct.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55243 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55243&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55243&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#92629) next »