This page is no longer maintained — Please continue to the home page at

Re: [scala-bts] #1654: Entities ignored in XML.loadString

No replies
Scala 2
Joined: 2009-03-05,
User offline. Last seen 42 years 45 weeks ago.

Reporter: mustaghattack | Owner: scala-xml_team
Type: defect | Status: new
Priority: normal | Component: XML support
Version: | Keywords:
Changes (by acruise):

* cc: alex@… (added)


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.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland