diff --git a/functions/domxml.xml b/functions/domxml.xml index 3ed24a203e..ea02197cd3 100644 --- a/functions/domxml.xml +++ b/functions/domxml.xml @@ -1,4 +1,4 @@ - +?> DOM XML functions DOM XML @@ -520,17 +520,17 @@ prints it. The other root node -- the comment -- is not returned. Retrieving root element - + <?php -$xmlstr = "<?xml version='1.0' standalone='yes'?> +$xmlstr = "<?xml version='1.0' standalone='yes'?> <!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd' [ <!ENTITY sp \"spanish\"> ]> -<!-- lsfj --> +<!-- lsfj --> <chapter language='en'><title language='en'>Title</title> <para language='ge'> &sp; - <!-- comment --> + <!-- comment --> <informaltable language='&sp;'> <tgroup cols='3'> <tbody> @@ -549,10 +549,10 @@ if(!$dom = xmldoc($xmlstr)) { exit; } -$root = $dom->root(); +$root = $dom->root(); /* or $root = domxml_root($dom); */ print_r($root); -?> +?> @@ -583,7 +583,7 @@ print_r($root); Creating a simple HTML document header - + <?php $doc = new_xmldoc("1.0"); $root = $doc->add_root("HTML"); @@ -701,15 +701,15 @@ echo $doc->dumpmem(); the set_attribute function of the node class. Adding an attribute to an element - + <?php $doc = new_xmldoc("1.0"); -$root = $doc->add_root("HTML"); -$head = $root->new_child("HEAD", ""); -$head->new_child("TITLE", "Hier der Titel"); -$head->set_attribute("Language", "ge"); -echo $doc->dumpmem(); -?> +$root = $doc->add_root("HTML"); +$head = $root->new_child("HEAD", ""); +$head->new_child("TITLE", "Hier der Titel"); +$head->set_attribute("Language", "ge"); +echo $doc->dumpmem(); +?> @@ -741,15 +741,15 @@ echo $doc->dumpmem(); the TITLE element. Adding an attribute to an element - + <?php $doc = new_xmldoc("1.0"); -$root = $doc->add_root("HTML"); -$head = $root->new_child("HEAD", ""); -$head->new_child("TITLE", "Hier der Titel"); -$head->set_attribute("Language", "ge"); -$children = $head->children() -?> +$root = $doc->add_root("HTML"); +$head = $root->new_child("HEAD", ""); +$head->new_child("TITLE", "Hier der Titel"); +$head->set_attribute("Language", "ge"); +$children = $head->children() +?>