Browse Source

Don't use external xml files

PEAR_1_4DEV
Marcus Boerger 23 years ago
parent
commit
253c97fbfe
  1. 20
      ext/simplexml/tests/004.phpt
  2. 19
      ext/simplexml/tests/004.xml

20
ext/simplexml/tests/004.phpt

@ -5,7 +5,25 @@ SimpleXML and CDATA
--FILE--
<?php
$sxe = simplexml_load_file(dirname(__FILE__).'/004.xml');
$sxe = simplexml_load_string(<<<EOF
<?xml version='1.0'?>
<!DOCTYPE sxe SYSTEM "notfound.dtd">
<sxe id="elem1">
Plain text.
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<![CDATA[CDATA block]]>
<elem3>
<elem4>
<?test processing instruction ?>
</elem4>
</elem3>
</elem2>
</elem1>
</sxe>
EOF
);
print_r($sxe);

19
ext/simplexml/tests/004.xml

@ -1,19 +0,0 @@
<?xml version='1.0'?>
<!DOCTYPE sxe SYSTEM "notfound.dtd" [
<!ENTITY % incent SYSTEM "sxe.ent">
%incent;
]>
<sxe id="elem1">
Plain text.
<elem1 attr1='first'>
<!-- comment -->
<elem2>
<![CDATA[CDATA block]]>
<elem3>
<elem4>
<?test processing instruction ?>
</elem4>
</elem3>
</elem2>
</elem1>
</sxe>
Loading…
Cancel
Save