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. > > If you really need to leave these unprocessed, then perhaps you can replace > the SAX EntityResolver with your own implementation? > > Perhaps if you could explain what you're trying to do? >
Unfortunately the EntityResolver just finds files containing external entities, so that doesn't seem to help much. 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 <a> tags and setting the src attributes for <img>, <link> and others so they can't be loaded, for a mail viewer web application. I'd prefer not to change the stream in any ways other than the intentional changes, so that I don't run into any weird bugs down the line. But I haven't found a good technique to do that yet. (*Chris*) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]