|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Discussion: Building XML Trees with PEAR's XML_Tree Class
If you have any questions or comments about this article then please post them here.
This forum post relates to this article |
|
#2
|
|||
|
|||
|
Building XML Trees with PEAR's XML_Tree Class
In this part of your code:
PHP Code:
I have been trying to send the contents of the XML to a variable for use later, in let's say a session variable... My dilemna it seems, is that when I attempt to print a particular variable (i.e. print $period , it returns nothing?? And I have checked the paths to the XML file, and all checks out.PHP Code:
When i print out the object $ch1 this is what I get in return, so how can I access this information or parse it out? Array ( [0] => xml_tree_node Object ( [attributes] => Array ( ) [children] => Array ( ) [content] => localhost [name] => db_host ) [1] => xml_tree_node Object ( [attributes] => Array ( ) [children] => Array ( ) [content] => ode [name] => db_name ) [2] => xml_tree_node Object ( [attributes] => Array ( ) [children] => Array ( ) [content] => root [name] => db_user ) [3] => xml_tree_node Object ( [attributes] => Array ( ) [children] => Array ( ) [content] => casey5 [name] => db_pass ) [4] => xml_tree_node Object ( [attributes] => Array ( ) [children] => Array ( ) [content] => c:/apache/htdocs [name] => root_folder ) ) Sincerely, CJ Last edited by jezmond5 : June 27th, 2003 at 07:28 PM. |
|
#3
|
|||
|
|||
|
PHP Code:
I tried this instead, and I got the results just fine Sorry, CJ |
|
#4
|
|||
|
|||
|
hello!
Actually I don't have much experience in parsing XML, and I want to ask you how to parse pre-existing XML document (with attributes) using XML tree class and inserting data attributes into a table from a MySQL database., and convert it again to an XML document (with attributes). please help me ! |
|
#5
|
|||
|
|||
|
not as hard as it looks
This is very possible to do, but I won't do it for you. I can show you though.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Discussion: Building XML Trees with PEAR's XML_Tree Class |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|