atom feed3 messages in org.codehaus.xstream.userRe: [xstream-user] double underline p...
FromSent OnAttachments
Jörg SchaibleAug 21, 2006 1:33 am 
J. Matthew PryorAug 21, 2006 3:59 am 
Frank KimAug 22, 2006 4:26 am 
Subject:Re: [xstream-user] double underline problem
From:Frank Kim (mtmu@gmail.com)
Date:Aug 22, 2006 4:26:32 am
List:org.codehaus.xstream.user

Thanks so much!

I got it to work by doing a:

XStream xstream = new XStream(new XppDriver(new XmlFriendlyReplacer("_-", "_")));

I love XStream. :-)

-Frank

On 8/21/06, Jörg Schaible <Joer@elsag-solutions.com> wrote:

Hi Frank,

Frank Kim wrote on Sunday, August 20, 2006 8:32 PM:

Hi,

I'm having a problem w/ single underlines being converted into double underlines.

What do you suggest I should do? Is there a patch for this that I can add to the code and recompile it myself?

there's achange of behaviour with XStream 1.2. Previously the conversion of
XML-friendly names was done quite directly on the field level - now it is done
just before writing the XML (due to the fact, that this XML name mangling is
tied to XML only and we do support other formats now, see experimental binary or
JSON support).

The good new is, that you can define yourself what XStream is using now to
create those names

XStream xstream = new XStream();

is now equivalent to:

XStream xstream = new XStream(new Xpp3Driver(new XmlFriendlyReplacer("_-",
"__")));

Just remember, that you have to produce valid XML tags tough ... otherwise your
XML parser will choke :)

- Jörg

--------------------------------------------------------------------- To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email