You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Dm...@toyota.com.au on 2004/09/07 02:35:02 UTC

RE: special characters replacement 'error' ??

Gary,

I've cc'd the dev list with this response in the hope that one of the
developers could confirm that this is simply an area that hasn't been
implemented.  I've had a bit of a look through and I assume XMLChar is the
class that would need to change (that's where the ampersand is deemed
'special').  To the developers - any reason that the specialChar array
couldn't me mutable at runtime so users could determine which characters
they would like escaped?  I don't know enough about its usage, and if its
used at compile time then obviously it wouldn't be quite that simple...

cheers
dim

-----Original Message-----
From: gs@smm.de [mailto:gs@smm.de] 
Sent: Monday, 6 September 2004 5:54 PM
To: user@xmlbeans.apache.org
Subject: RE: special characters replacement 'error' ??

Hi Dim,

thank you for your support !

The first thing I tried was to assign the string with german umlauts.

As far as I can figure out XmlBeans is not able to replace them with their
entity counterparts - I did not find an option to do so.

Disappointed by this behaviour I coded this small method to translate my
stuff.

The only thing XmlBeans replaces is the ampersand - and I really have no
idea how to change this behaviour :(

In the meantime I tried JAXB - umpf ... nasty stuff ;)

JAXB is able to translate my xsd-file into java files ... but the getter
and setter methods supplied are kind of 'nasty' and parsing of a xml file
seems to be impossible :( Have to do some further testing with this.

So till now I stuck with this part of my application ... seems as if I
have to use 'good old' DOM ...

Bye,
Gary


--------------------------------------------------------------------------
-----------------------

I don't know the specifics of how to do what you're trying to do, but the
fact that an umlaut is represented as "& szlig;" is something that
XMLBeans should be doing, not you.  When you call the setter, what you are
doing is saying the value of this element (/attribute) is "stra& szlig;e",
XMLBeans then goes - hey, '&' needs to be escaped, and does so.  You
should be setting the value as the real value - I don't know if XMLBeans
supports encoding umlauts or not, will let one of the developers answer
that.

cheers
dim


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


######################################################################
DISCLAIMER: 
This email and any attachment may contain confidential information.
If you are not the intended recipient you are not authorized to copy
or disclose all or any part of it without the prior written consent
of Toyota.

Opinions expressed in this email and any attachment are those of the
sender and not necessarily the opinions of Toyota.
Please scan this email and any attachment for viruses.
Toyota does not accept any responsibility for problems
caused by viruses, whether it is Toyota's fault or not.
######################################################################

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org