Howto: PHP4 Dom XML to PHP5 XML ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Can anyone point me to a guide or something for conversion?
I tryed
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:

$eir_dom = domxml_open_mem($eir_padfile_content);
$eir_root_node = $eir_dom->document_element(); // = root element
$eir_dom = new DOMDocument;
// need equalant of: document_element();

... $nodes = $cur_root_node->child_nodes();
... if ($test_node->node_name() == $next_node_name_to_find) {
//  need equalant of: child_nodes(); node_name()

... if ($node_child->node_type() == XML_TEXT_NODE) {
// need equalant of: set_content, node_type()

best regards
Thomas Schulz

Re: Howto: PHP4 Dom XML to PHP5 XML ?

Quoted text here. Click to load it

I tryed DBG with PHPCoder.... (and checked DBG was correctly installed in  
phpinfo(); )
Start DBG listener, and sets it for PHPCoder. However, nothing happens when  
I load site
in PHPCoder (I have it running in my localhost at http://mysite.localhost )

But if anyone can recommend another edtor which works with breakpoints?
(I need nothing fancy as I usually do not need such debugging tools with  

best regards

Re: Howto: PHP4 Dom XML to PHP5 XML ?

Quoted text here. Click to load it

I had misread the help... actually...
I showhow I missed the new properties...

Solution is dead simple... Doh!

child_nodes(); >> childNodes;
node_name(); >> nodeNames;

best regards

Site Timeline