I'm trying to parse a xml document in php and to get in an array, but it
sometime give me really strange result.
Like if I have:
$simple=" <item> test </item>";
$parser = xml_parser_create();
xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
xml_parse_into_struct($parser,$simple,$vals,$index);
xml_parser_free($parser);
It will give me this in $index
Array
(
[ITEM] => Array
(
[0] => 0
)
)
#######
And this in $vals
Array
(
[0] => Array
(
[tag] => ITEM
[type] => cdata
[level] => 1
[value] => *test
)
)
What does the "*" means? Why is it there? Have any other's have
experienced any problem with php and xml?
Compiled with those option:
./configure --enable-track-vars --with-gd=../gd-1.8.3
--with-swf=../php4-swf --with-mysql --enable-xslt
--with-xslt-sablot=../Sablot-0.60 --with-apxs
--enable-sablot-errors-descriptive --with-xml
--with-dom=/usr/include/libxml --with-zlib
ON Apache 1.3.20, php 4.0.6 and redhat 6.2
--
Francis Fillion, BAA SI
Broadcasting live from his linux box.
And the maintainer of http://www.windplanet.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]