git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@332465 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Phil Sturgeon 2013-12-18 21:02:00 +00:00
parent 7a83e2a0c9
commit 8ea1f0e33d

View file

@ -15,9 +15,14 @@
$file = "data.xml";
$depth = array();
function startElement($parser, $name, $attrs)
function startElement($parser, $name, $attrs)
{
global $depth;
if (!isset($depth[$parser])) {
$depth[$parser] = 0;
}
for ($i = 0; $i < $depth[$parser]; $i++) {
echo " ";
}
@ -25,7 +30,7 @@ function startElement($parser, $name, $attrs)
$depth[$parser]++;
}
function endElement($parser, $name)
function endElement($parser, $name)
{
global $depth;
$depth[$parser]--;