First time SAX user... trying to read html from xml doc

Hi, I am trying to read data that has embedded HTML in an XML document. For example:

<data><a href="/mygif.gif">A picture</a></data>

So, I am finding the <data> tags, but when I try to read the text using the characters method, I receive a blank. I am using JDK 1.1.8 with Xerces 3.0.2. Am I doing something wrong? Thanks.

[385 byte] By [eborisow] at [2007-9-26 2:37:53]
# 1

which characters method do you mean ?

In case you're concerned about text on the <data> element, there is none in your example, because in

<a href=....>A picture</a>

<a> is another valid XML element with an href attribute - and text in it.

You can try something like this:

<data>[CDATA[<a href="/mygif.gif">A picture</a>]]</data>

Good luck.

lk555 at 2007-6-29 10:07:52 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...