finding text strings in html code

From: Date: Sat, 12 Jun 2004 10:34:28 +0000
Subject: finding text strings in html code
Groups: php.general 
Request: Send a blank email to php-general+get-188158@lists.php.net to get a copy of this message
I am beginning a project that will involve moving data from an mssql table to xml files. In addition to fixing non-xml compliant html in the text fields and outputting the data to a new xml format, I need to find certain chunks of text marked by standard html comments at the start and end, comment out everything between the comments, and insert the found text into its own xml element (which will in some cases be inline). I have played with code using substr/str_pos, running html tidy with exec() and it works. But searching the archives, it seems like the new html tidy tags in php5 will be more useful. In most cases the target text is in a one row, one cell table. Any advice on how to attack this would be appreciated. I can handle the coding, I just have a feeling I am approaching this from the hard way. Kathleen

« previous php.general (#188158) next »