[XML-SIG] How can I search for a string of text

John Day jday@picard.csihq.com
Tue, 20 Apr 1999 12:53:44 -0400


Use a SAX interface to access the characters of the text file. Sounds like you
might know the enclosing tag names too (<BODY> ... </BODY>), so you might
be able to narrow the search somewhat. In any case, SAX will present the 
characters
as a stream for filtering.
-jday
At 11:00 AM 4/20/99 -0400, you wrote:

>Hello everyone,

>I need to remove a string from my HTML files but I don't know the best way to
>find it. There are usually line feeds in the HTML between the string so the
>string does not appear as one DOM text node. Does anyone know the best way to
>find contiguous text that spans multiple DOM nodes?

>While I'm at it, is there a good way to remove blank lines from ?ML files? 
>As I
>read and rewrite my XML files, I find that extra line feeds accumulate. I've
>tried a few different approaches but have never been fully satisfied with 
>them.

>Thanks much,
>Jeff



_______________________________________________
XML-SIG maillist - XML-SIG@python.org
http://www.python.org/mailman/listinfo/xml-sig