[vwnc] XML Encode and Decode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] XML Encode and Decode

Karsten Kusche
Hi there,

Is there a way to decode and encode a Unicode String from and to XML?
Thing is, I have a String without any XML tag, but all non-ascii
Characters are encoded like { or ü.

XML.XMLParser can only parse whole documents and does all the decoding
itself it seems. Is there some smaller class that can be used to
accomplish just the encoding and decoding?

Kind Regards
Karsten


--
Karsten Kusche - Dipl.Inf. - [hidden email]
Tel: +49 3496 21 43 29
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] XML Encode and Decode

Reinout Heeck-2
Karsten wrote:

> Hi there,
>
> Is there a way to decode and encode a Unicode String from and to XML?
> Thing is, I have a String without any XML tag, but all non-ascii
> Characters are encoded like { or ü.
>
> XML.XMLParser can only parse whole documents and does all the decoding
> itself it seems. Is there some smaller class that can be used to
> accomplish just the encoding and decoding?
>
>  
Just about any HTTP framework (whether client or server) has to
implement this kind of escape encoding.

In such frameworks two different escape encodings will be present, they
are typically called 'url escaping' and 'html escaping'. The latter is
the one you will want, so look for methods named something like
#htmlEscaped (either on CharacterArray or on stream wrappers/encoders).

HTH,

Reinout
-------

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc