XML_Tree
[ class tree: XML_Tree ] [ index: XML_Tree ] [ all elements ]

Source for file error_handling_1.php

Documentation is available at error_handling_1.php

  1. <?php
  2.  
  3. require_once 'XML/Tree.php';
  4.  
  5. $tree = new XML_Tree;
  6.  
  7. $root =$tree->addRoot('_#:A');
  8.  
  9. /* Check for error on the Root node */
  10.  
  11. if (PEAR::isError($root->error)) {
  12.     var_dump($root->error);
  13. }
  14.  
  15. $child =$root->addChild('abc:def''bar');
  16.  
  17. if (PEAR::isError($child)) {
  18.     var_dump($child);
  19. }
  20.  
  21. $root->registerName('abc','http://some_name_space');
  22.  
  23. $child->registerName('abc''http://some_other_name_space');
  24.  
  25.  
  26. echo $tree->getNodeNamespace($child);
  27.  
  28. if (PEAR::isError($child)) {
  29.     var_dump($child);
  30. }
  31.  
  32. echo $tree->get();
  33.  
  34. ?>

Documentation generated on Mon, 11 Mar 2019 15:34:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.