This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > June 2006 > How to handle control characters in XML?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to handle control characters in XML?
|
|
| Gustavo Echevarria 2006-06-27, 8:27 pm |
| Hello all
As is well know the control characters below 1F cannot be written in a XML,
nor in entities nor in characters. But what happens if i want to serialize a
XML with those chars? how can i make the transition inside the XML from
text? i saw that the internet explorer (for example) allows the load of such
a XML ... how it do the parse? The thing i want to make is the following, i
get a text from a control, encapsulate it inside a XML, transfer and read,
get the original text.
This is a XML example
<P V="?"/> or <P V=""/>
i can make the XML, but i can't load it using the MSXML.
Thanks in advance
Gustavo Echevarria
| |
| Oleg Tkachenko [MVP] 2006-06-27, 8:27 pm |
| Gustavo Echevarria wrote:
> Hello all
>
> As is well know the control characters below 1F cannot be written in a XML,
> nor in entities nor in characters. But what happens if i want to serialize a
> XML with those chars? how can i make the transition inside the XML from
> text? i saw that the internet explorer (for example) allows the load of such
> a XML ... how it do the parse?
That's a bug in IE, it's too forgiving.
> The thing i want to make is the following, i
> get a text from a control, encapsulate it inside a XML, transfer and read,
> get the original text.
One way is to use Base64 encoding, another - to replace control
characters with your own encoding scheme, e.g. "__0x5__".
--
Oleg Tkachenko [XML MVP, MCAD]
http://www.XmlLab.Net | http://www.XLinq.Net | http://blog.tkachenko.com
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|