[jdom-interest] predefined entities

Jason Hunter 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.

-jh-

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.
> 
> Alex
> 
> >>> Neville Peter <p_nevilleuk at yahoo.co.uk> 12/13/02 12:06PM >>>
> Also,
> 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:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com



More information about the jdom-interest mailing list