[PHP] finding text strings in html code
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] finding text strings in html code
* Thus wrote Kathleen Ballard ([EMAIL PROTECTED]): I am beginning a project that will involve moving data from an mssql table to xml files. ... 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. I think you're on the right track with using tidy's php5 features. Here is some more documentation on tidy, hopefully it will push your approach in the right direction: http://www.coggeshall.org/tidy.php Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php