- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Re: [scala-bts] #1654: Entities ignored in XML.loadString
Tue, 2010-02-16, 08:58
--------------------------+-------------------------------------------------
Reporter: mustaghattack | Owner: scala-xml_team
Type: defect | Status: new
Priority: normal | Component: XML support
Version: | Keywords:
--------------------------+-------------------------------------------------
Changes (by acruise):
* cc: alex@… (added)
Comment:
The SAX parser is handing us the "&" in a separate `characters` call, but
it doesn't give any hint that it was previously an entity. Of course, in
the case of amp,lt,gt (and quot in attributes) they couldn't have been
literals, but there are plenty of situations in which a stream contains
characters encoded as entities that could just as well have been literals,
and the only way we'd be able to tell is that we'd receive them in a
separate `characters` call. My inclination is to leave this one alone (or
even change the XML literal parser to act like SAX!) unless someone can
advance a compelling argument for change.