>I do not want to change the default Xml encoding which is:
>
>
><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>
>
>I also do not want to use CDATA.
>
>But, I need to encode special characters such as à to be & #224;.
>
>Is there any support at the Xml object that allows to encode some Xml content like this?
If you can type them you can use them. There are only six special characters and they have predefined entities :
" & quot;
& & amp;
' & apos;
< & lt;
> & gt;
If you can't type it can use & #224; If it occurs many times then you can define it as an entity reference so that it easily remembered:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE sample [
<!ENTITY agrave "& #224">
]>
<Name>
<First>Fred</First>
<Last>H& agrave;bras</Last>
</Name>
NOTE: I've has to put a space after every occurrence of '&' above to show it properly. Here's how if looks without the space:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE sample [
<!ENTITY agrave "à">
]>
<Name>
<First>Fred</First>
<Last>Hàbras</Last>
</Name>
Guess that's not a proper name tho :-{