Re: [PHP] Replacing text of a DOM text node

2006-06-07 Thread Frank Arensmeier
Jochem, thank you for your input! So, right now I am able to access all text nodes by e.g. $nodeElement - parentNode - childNodes - item(0); - returns Lenght, Width and so on $nodeElement - parentNode - childNodes - item(1); - is empty $nodeElement - parentNode - childNodes - item(2); -

Re: [PHP] Replacing text of a DOM text node

2006-06-07 Thread Rob Richards
Hi Frank, Frank Arensmeier wrote: Jochem, thank you for your input! So, right now I am able to access all text nodes by e.g. $nodeElement - parentNode - childNodes - item(0); - returns Lenght, Width and so on $nodeElement - parentNode - childNodes - item(1); - is empty $nodeElement -

Re: [PHP] Replacing text of a DOM text node

2006-06-07 Thread Frank Arensmeier
Hello Rob. Thank you very much indeed! Since this DOM thing is very new to me (well, maybe not the DOM concept but working with DOM function in PHP), I appreciate especially the links you provided. Right now I am able to loop through all text nodes, replace certain characters and mark a

Re: [PHP] Replacing text of a DOM text node

2006-06-07 Thread tedd
BTW, is there an easy way to get the total amount of items in a curent node? count ( $nodeElement - parentNode - childNodes ) always returns 1. For now the only solution I know of is looping through the nodeElements (e.g. foreach ( $nodeElement as $value ) and have a counter inside the loop.

[PHP] Replacing text of a DOM text node

2006-06-06 Thread Frank Arensmeier
Hello! Basically, I am working on a script that is supposed to convert table data from metric to imperial data. I want to pare XHTML pages (containing up to three different tables) with the PHP DOM functions in order to be able to access and manipulate the tables one by one. Parsing and

Re: [PHP] Replacing text of a DOM text node

2006-06-06 Thread Jochem Maas
Frank Arensmeier wrote: Hello! Basically, I am working on a script that is supposed to convert table data from metric to imperial data. I want to pare XHTML pages (containing up to three different tables) with the PHP DOM functions in order to be able to access and manipulate the tables one