You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by al...@cardsystems.com on 2000/02/08 00:36:51 UTC

need help with binary data format

Hi,
I wonder if someone could answer a simple question. I am new to XML, so
maybe the question I have is pretty trivial, but here it is:
I am using xerces C++ parser on NT platform and it works fine unless I have
binary characters in my XML data. Assuming that I know the structure of the
XML, field name that might contain binary characters, and even all the
possible binary characters that can appear (there are only 2 or 3), what
would be the easiest way to parse correctly?
 
Any help is greatly appreciated.
Thanks,
 
Alex K.
 

Re: need help with binary data format

Posted by Eric Ulevik <ea...@fast.fujitsu.com.au>.
You can't just include binary data in XML. XML consists of printable characters.

One solution is to uuencode the binary data before placing it in XML. Another solution would be to encode your 2 or 3 characters to something like &mychar1;.

Regards,

Eric Ulevik
  ----- Original Message ----- 
  From: alex.kravchenko@cardsystems.com 
  To: xerces-dev@xml.apache.org 
  Sent: Tuesday, 8 February 2000 10:36 am
  Subject: need help with binary data format


  Hi,
  I wonder if someone could answer a simple question. I am new to XML, so maybe the question I have is pretty trivial, but here it is:
  I am using xerces C++ parser on NT platform and it works fine unless I have binary characters in my XML data. Assuming that I know the structure of the XML, field name that might contain binary characters, and even all the possible binary characters that can appear (there are only 2 or 3), what would be the easiest way to parse correctly? 
   
  Any help is greatly appreciated.
  Thanks,
   
  Alex K.


RE: need help with binary data format

Posted by Linda Derezinski <li...@sclrules.com>.
We have many possibilities for binary characters and chose to enter them in
hex or octal.
<sometag data=”0x33” />
<sometag data=”044” />

In the C++ code we wrote a class to process the hex or octal.

-Linda Derezinski
Linda@sclrules.com <ma...@sclrules.com>
Interface and Control Systems Inc.

-----Original Message-----
From: Alex Kravchenko [mailto:alex.kravchenko@cardsystems.com]
Sent: Monday, February 07, 2000 6:37 PM
To: xerces-dev@xml.apache.org
Subject: need help with binary data format

Hi,
I wonder if someone could answer a simple question. I am new to XML, so
maybe the question I have is pretty trivial, but here it is:
I am using xerces C++ parser on NT platform and it works fine unless I have
binary characters in my XML data. Assuming that I know the structure of the
XML, field name that might contain binary characters, and even all the
possible binary characters that can appear (there are only 2 or 3), what
would be the easiest way to parse correctly?

Any help is greatly appreciated.
Thanks,

Alex K.