You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by gs...@smm.de on 2004/09/04 04:11:04 UTC

special characters replacement 'error' ??

Hm ... just got the next problem :(

For my application I have to replace all german umlauts with there
entity-counterpart, because the gateway I connect to can not handle those
special characters.

For example 'straße' is replaced with 'stra& szlig;e'.

But after assigning this string to an XmlObject using the setter-method
provided, XmlBeans is replacing the ampersand with the entity '& amp;' :(

So after doing this:

item.setFoo("stra& szlig;e") ;
System.out.println(item.toString()) ;

the output is 'stra& amp;szlig;e'. Which does not make any sense to me,
because the ampersand is in the string again ...

Same is valid for saving the XML to a file .. everytime there ist '& amp;'
in the resulting XML :(

This field then is refused by the gateway I am communicating with :(

Is there a way to stop XmlBeans doing so ? I've tried several things using
XmlString and XmlOption ... but could not figure out how to do it.

Thank you !!

Bye,
Gary


(I used spaces after the ampersand because I do not know how the email is
displayed)


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