#19742 [Fbk->Csd]: [chm] bug on ref.domxml.html

From: Date: Fri, 01 Nov 2002 10:12:47 +0000
Subject: #19742 [Fbk->Csd]: [chm] bug on ref.domxml.html
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349387@lists.php.net to get a copy of this message
ID: 19742 Updated by: goba@php.net Reported By: joseals-uned@eresmas.net -Status: Feedback +Status: Closed Bug Type: Documentation problem Operating System: windows PHP Version: 4.2.1 New Comment: This bug is completely unrelated to the CHMs, and completely unrelated to the bug system. This should be posted as a user note or to a code library somewhere. => Closing. Previous Comments: ------------------------------------------------------------------------ [2002-10-31 13:58:36] iliaa@php.net Does the problem still exist in the latest version (10th edition) of the chm manual? ------------------------------------------------------------------------ [2002-10-03 19:37:18] sniper@php.net reclassified ------------------------------------------------------------------------ [2002-10-03 15:37:02] joseals-uned@eresmas.net Well, I am reading bugs of how to get the different objects and components of an xml document, and I have got a simply and fine solution that is like follow, <?php $my_xml_file = file("books.xml") or die("Error...<br>"); $dom_tree = domxml_xmltree( $my_xml_file[0] ); echo "DOMTREE loaded<br>"; print("<pre>"); print_r( $dom_tree ); print("</pre>"); echo "<br>\n"; ?> The best of it, you do not need the whole path to read the file and you get the whole description of your DOM. This is my "books.xml" file, <?xml version='1.0' encoding='UTF-8'?><books><book><Title>La peste</Title><Author>Albert Camus</Author><Price>30</Price></book></books> where the tree is listed in one only line. And here is what I get with the above php code, DOMTREE loaded DomDocument Object ( [name] => #document [url] => [version] => 1.0 [encoding] => UTF-8 [standalone] => -1 [type] => 9 [compression] => -1 [charset] => 1 [0] => 1 [1] => 8040992 [children] => Array ( [0] => DomElement Object ( [type] => 1 [tagname] => books [0] => 2 [1] => 8040880 [children] => Array ( [0] => DomElement Object ( [type] => 1 [tagname] => book [0] => 3 [1] => 8040784 [children] => Array ( [0] => DomElement Object ( [type] => 1 [tagname] => Title [0] => 4 [1] => 8040688 [children] => Array ( [0] => DomText Object ( [type] => 3 [name] => #text [content] => La peste [0] => 5 [1] => 8040608 ) ) ) [1] => DomElement Object ( [type] => 1 [tagname] => Author [0] => 6 [1] => 8040512 [children] => Array ( [0] => DomText Object ( [type] => 3 [name] => #text [content] => Albert Camus [0] => 7 [1] => 8048576 ) ) ) [2] => DomElement Object ( [type] => 1 [tagname] => Price [0] => 8 [1] => 8048512 [children] => Array ( [0] => DomText Object ( [type] => 3 [name] => #text [content] => 30 [0] => 9 [1] => 8048432 ) ) ) ) ) ) ) ) ) And that's it. I hope you like. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19742&edit=1

« previous php.doc (#969349387) next »