ID: 19742 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Documentation problem Operating System: windows PHP Version: 4.2.1 New Comment:
Does the problem still exist in the latest version (10th edition) of the chm manual? Previous Comments: ------------------------------------------------------------------------ [2002-10-03 19:37:18] [EMAIL PROTECTED] reclassified ------------------------------------------------------------------------ [2002-10-03 15:37:02] [EMAIL PROTECTED] 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 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php