[jdom-interest] predefined entities
jhunter at acm.org
Fri Dec 13 22:29:18 PST 2002
JDOM deals with the semantics of the document contents, not its literal
bytes. When you want the attribute value, you want the characters, not
a byte representation of the characters. Plus, there are other output
mechanisms where ' would be improper, such as the SAXOutputter,
DOMOutputter, and JTreeOutputter. If you want to stream the document
directly to a database, you can use a Stream.
Alex Rosen wrote:
> SAX doesn't give you the entities in an attribute, only in element content. Since JDOM accesses the parser via SAX, JDOM can't get this info. (Plus, the JDOM API doesn't support it either.) I think Xerces 2's XNI interface does support this, you might want to check it out. Mabye using DOM with Xerces 2 will do the trick.
> >>> Neville Peter <p_nevilleuk at yahoo.co.uk> 12/13/02 12:06PM >>>
> You mention the ethos is to see the actual data rather
> than the xml representation. Well, the actual data is
> the entity reference & # 39; and this is what I would
> like to see (the browser can convert it to what is
> required for visual representation). It seems a bit
> wasteful to me for the XML parser to convert this to &
> only for me to have to convert it back to & # 39; in
> order to store it in the database.
> Is it JDOM that is causing this to happen or the
> underlying parser?
> Do you know if there any parsers that behave as I
> would like?
> Thanks for you comments.
> To control your jdom-interest membership:
More information about the jdom-interest