DOMDocument help

From: Date: Thu, 12 Feb 2009 09:49:04 +0000
Subject: DOMDocument help
Groups: php.general 
Request: Send a blank email to php-general+get-288142@lists.php.net to get a copy of this message
I'm using php 5.2.5 with the php-xml module. I need to split a string of html into elements. IE - this <b>is</b> a string <b>that</b> has some bold <b>words</b> in it. I need to be able to take that string and split it up into textNodes for the parts that are not in bold text, and bold nodes containing the bold elements. I've tried creating a new DOMDocument object and inputing the line into it - $tmpNode = new DOMDocument; $tmpNode->loadHTML($string); but I can't figure out how to get the the useful nodes out of it to then append as children in the document I'm creating. Any tips on how to do this?

« previous php.general (#288142) next »