Subject: Re: [xsl] Why Hex character like Hex04 are not suppoted by XML/XSL From: Mike Brown <mike@xxxxxxxx> Date: Fri, 15 Mar 2002 20:36:56 -0700 (MST) |
Avula, Raj wrote: > I will have to encode all the rawdata string and decode > it back after parsing which is a performace hit. Does any body know why xml > does not support these hexa-decimal characters. So that you will not make the mistake of thinking that XML is to be used for blindly encapsulating an arbitrary sequence of bytes. You must clearly distinguish between the notion of a character (abstract) and the encoded representation of that character. Then you will see that the XML spec's restrictions on characters are not at all unreasonable. XML documents are a sequence of Unicode characters -- these characters are abstract objects, each with a unique number, that may be encoded as bits & bytes for storage/transmission in a *multitude* of ways. If you think of your binary data as a blob of non-characters, it should be evident that in order to construct an XML document, you must be working entirely with characters, independent of their encoding. So your binary data should be converted to characters perhaps with a Base64 scheme. Once you have your document as a Unicode string, you can then encode/serialize the document in a UTF-8 or iso-8859-1 or ASCII or whatever form you desire, as long as the encoding supports the characters in your document or any unsupported characters are properly escaped. - Mike ____________________________________________________________________________ mike j. brown | xml/xslt: http://skew.org/xml/ denver/boulder, colorado, usa | personal: http://hyperreal.org/~mike/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Why Hex character like Hex04 , Avula, Raj | Thread | [xsl] Enhanced SGML to XML conversi, G. Ken Holman |
[xsl] Why Hex character like Hex04 , Avula, Raj | Date | [xsl] Enhanced SGML to XML conversi, G. Ken Holman |
Month |