PHP4 Dom XML to PHP5 XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dk_sz

    PHP4 Dom XML to PHP5 XML

    Is it just me... Or is PHP5 XML very limited?
    Or am I missing something very obvious?
    Any way to use PHP4 Dom XML in PHP5?
    Does anyone know why support for it was dropped?


    I have following code I need to have replaced:


    PHP4
    $eir_dom = domxml_open_mem ($eir_padfile_c ontent);
    $eir_root_node = $eir_dom->document_eleme nt(); // = root element

    PHP5
    $eir_dom = new DOMDocument;
    $eir_dom->loadXml($eir_p adfile_content) ;
    // how do I set $eir_root_node ?


    PHP4
    .... $nodes = $cur_root_node->child_nodes( );
    .... if ($test_node->node_name() == $next_node_name _to_find) {
    PHP5
    // child_nodes(); node_name()


    PHP4
    .... if ($node_child->node_type() == XML_TEXT_NODE) {
    $node_child->set_content($n ew_content);
    break;
    }
    PHP5
    // set_content, node_type()



    best regards
    Thomas Schulz


  • dk_sz

    #2
    Re: PHP4 Dom XML to PHP5 XML

    > Is it just me... Or is PHP5 XML very limited?

    Check out


    best regards
    Thomas


    Comment

    Working...