Hi Jorg,

I'm sorry, you are absolutely right. I was under the strange impression
that attributes could contain valid XML characters without escaping. This
was stupid.
I feel better now.

Thank you

On Thu, Sep 25, 2014 at 9:23 AM, Jörg Schaible <joerg.schai...@swisspost.com
> wrote:

> Hi Perdo,
>
> Pedro Santos wrote:
>
> > Hello all,
> >
> > I've been hitting my head on the wall because I want variables in my
> > classes to be serialized as attributes. This I'm being able to do. The
> > only problem is that some strings that express conditions (e.g. "i < 3")
> > still get escaped even though it's not necessary.
>
> Why do you think that attribute values should *not* be escaped? XStream
> uses
> by default either its own XML writer implementation or - in case of a StAX-
> based driver - the StAX XMLOutputFactory. Even the latter escape attribute
> values.
>
> > Is there any way to turn off this behavior in XStream?
>
> No by default, but you may overwrite PrettyPrintWriter.writeAttributeValue
>
> - Jörg
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>


-- 
Pedro Santos

"O que mais preocupa não é o grito dos violentos, dos corruptos, dos
desonestos, dos sem ética. O que mais preocupa é o silêncio dos bons"

Martin Luther King

“Learning is experiencing. Everything else is just information.”

Albert Einstein

Reply via email to