Annotation of embedaddon/php/ext/simplexml/tests/005.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SimpleXML: Text data
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("simplexml")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $sxe = simplexml_load_string(<<<EOF
! 9: <?xml version='1.0'?>
! 10: <!DOCTYPE sxe SYSTEM "notfound.dtd">
! 11: <sxe id="elem1">
! 12: Plain text.
! 13: <elem1 attr1='first'>
! 14: <!-- comment -->
! 15: <elem2>
! 16: Here we have some text data.
! 17: <elem3>
! 18: And here some more.
! 19: <elem4>
! 20: Wow once again.
! 21: </elem4>
! 22: </elem3>
! 23: </elem2>
! 24: </elem1>
! 25: </sxe>
! 26: EOF
! 27: );
! 28:
! 29: var_dump(trim($sxe->elem1->elem2));
! 30: var_dump(trim($sxe->elem1->elem2->elem3));
! 31: var_dump(trim($sxe->elem1->elem2->elem3->elem4));
! 32:
! 33: echo "---Done---\n";
! 34:
! 35: ?>
! 36: --EXPECT--
! 37: string(28) "Here we have some text data."
! 38: string(19) "And here some more."
! 39: string(15) "Wow once again."
! 40: ---Done---
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>