Re: [OT] XML Preprocessing

2008-03-17 Thread Dave Newton
--- Chris Pratt <[EMAIL PROTECTED]> wrote: > What I'm trying to do is read a stream of HTML and make changes to > certain tags ,like adding a target="_blank" to the tags and > setting the src attributes for , and others so they can't > be loaded, for a mail viewer web application. I'd prefer not

Re: [OT] XML Preprocessing

2008-03-17 Thread Chris Pratt
On Mon, Mar 17, 2008 at 8:02 AM, Roger Varley <[EMAIL PROTECTED]> wrote: > I've never tried to do this since, normally, you want the XML processor to > handle entities such as the & symbol - and if either the input XML or output > XML contains these symbols unaltered then you don't have legal XML

Re: [OT] XML Preprocessing

2008-03-17 Thread Roger Varley
I've never tried to do this since, normally, you want the XML processor to handle entities such as the & symbol - and if either the input XML or output XML contains these symbols unaltered then you don't have legal XML. If you really need to leave these unprocessed, then perhaps you can replace

Re: [OT] XML Preprocessing

2008-03-16 Thread crackeur
VTD-XML doesn't convert entities automatically... it perserves those things by nature of non-extractive parsing (http://vtd-xml.sf.net) -- Original message -- From: "Chris Pratt" <[EMAIL PROTECTED]> > Sorry I missed the normal Friday free-for-all with my Off Topic > qu

[OT] XML Preprocessing

2008-03-16 Thread Chris Pratt
Sorry I missed the normal Friday free-for-all with my Off Topic question, but I'm hoping someone around here has already solved the problem I'm staring at. I am trying to pre-process a stream of HTML/XML. My first thought was to just use SAX (with TagSoup for the HTML) and watch for the tokens I