Forum Moderators: coopster
I've not [yet] delved deeply into XML/XSLT wizardry, but I'm sidling along towards it.
Here's what I consider my first challenge:
I have the output from a Web service that delivers XHTML 1.1-Compliant markup as a set of nested <table> elements. Since it is displaying tabular data, this is perfectly legitimate.
Normally, I embed this in my pages using PHP's include(url) [us3.php.net] function.
What I want to do is convert the <table>,<tr> and <td> elements to <div> elements, and the </table>, </tr> and </td> elements to </div>.
This is so I could reformat the data for cellphones and handhelds.
I could do this with preg_replace() [us3.php.net], but that seems awful "20th Century." Is there a way to do this with PHP's DOM functions [us3.php.net]?
Remember, this needs to be processed HTML output (Rendered URI), not raw source (which is why I use PHP's include(url) function). I believe that you can use the DOM Objects to "suck in" a rendered URI.
There's definitely nothing wrong with expanding one's horizons, but just because something's 20th century don't mean it's even got a foot in the proverbial pasture.