Posted by dk_sz on 08/11/05 16:21
Can anyone point me to a guide or something for conversion?
I tryed
http://alexandre.alapetite.net/doc-alex/domxml-php4-php5/index.en.html
but it doesn't work (not all parts anyway) - and as I can't find a
working IDE/debugger combination I can't currently figure out why.
I need to translate following code:
PHP4
$eir_dom = domxml_open_mem($eir_padfile_content);
$eir_root_node = $eir_dom->document_element(); // = root element
PHP5
$eir_dom = new DOMDocument;
$eir_dom->loadXml($eir_padfile_content);
// need equalant of: document_element();
PHP4
.... $nodes = $cur_root_node->child_nodes();
.... if ($test_node->node_name() == $next_node_name_to_find) {
PHP5
// need equalant of: child_nodes(); node_name()
PHP4
.... if ($node_child->node_type() == XML_TEXT_NODE) {
$node_child->set_content($new_content);
break;
}
PHP5
// need equalant of: set_content, node_type()
best regards
Thomas Schulz
Navigation:
[Reply to this message]
|