Re: Why Hex character like Hex04 are not suppoted by X
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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format