php-src/ext/simplexml/tests/004.phpt

48 lines
991 B
Plaintext
Raw Normal View History

2003-10-25 21:07:37 +00:00
--TEST--
SimpleXML and CDATA
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--
<?php
$sxe = simplexml_load_file(dirname(__FILE__).'/004.xml');
print_r($sxe);
2003-10-26 00:35:56 +00:00
$elem1 = $sxe->elem1;
$elem2 = $elem1->elem2;
var_dump(trim((string)$elem2));
2003-10-25 21:07:37 +00:00
?>
===DONE===
2003-10-25 21:07:37 +00:00
--EXPECT--
simplexml_element Object
(
[elem1] => simplexml_element Object
(
[comment] => simplexml_element Object
(
)
[elem2] => simplexml_element Object
(
2003-10-25 23:06:23 +00:00
[elem3] => simplexml_element Object
(
2003-10-25 21:07:37 +00:00
[elem4] => simplexml_element Object
(
[test] => simplexml_element Object
(
)
)
)
)
)
)
string(11) "CDATA block"
===DONE===