Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSD datatype for binary ASCII data for a Tag in XML

Reply
Thread Tools

XSD datatype for binary ASCII data for a Tag in XML

 
 
shashidhar.yarlagadda@gmail.com
Guest
Posts: n/a
 
      02-26-2008
hi,

hey! i am writing an XML Schema Defination where i got a sistutation
in such way that i need to defina a tag that should hold binary data
(ASCII data). How can i handle this sistutation? I mean what datatype
i need to mention.
i saw the base64Binary data type but it will not support all the ascii
characters right? In this scenario can any one please give me a
thought?

Thanks much,
Sha
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      02-26-2008
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> hey! i am writing an XML Schema Defination where i got a sistutation
> in such way that i need to defina a tag that should hold binary data
> (ASCII data). How can i handle this sistutation? I mean what datatype
> i need to mention.
> i saw the base64Binary data type but it will not support all the ascii
> characters right? In this scenario can any one please give me a
> thought?


You will need to encode the binary data for storing it in XML and then
decode it when parsing it out of the XML.

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
usenet@tech-know-ware.com
Guest
Posts: n/a
 
      02-26-2008
On 26 Feb, 18:24, (E-Mail Removed) wrote:
> hi,
>
> hey! i am writing an XML Schema Defination where i got a sistutation
> in such way that i need to defina a tag that should hold binary data
> (ASCII data). How can i handle this sistutation? I mean what datatype
> i need to mention.
> i saw the base64Binary data type but it will not support all the ascii
> characters right? In this scenario can any one please give me a
> thought?
>
> Thanks much,
> Sha


hexBinary is another alternative. It's simpler than base64Binary, but
not as efficient. You can read about how they encode data at:

http://www.w3.org/TR/xmlschema11-2/#hexBinary
http://www.w3.org/TR/xmlschema11-2/#base64Binary

Refer to the referenced IETF RFC (http://www.ietf.org/rfc/rfc3548.txt)
to find out how base64 is encoded.

HTH,

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/
 
Reply With Quote
 
Joseph Kesselman
Guest
Posts: n/a
 
      02-26-2008
How "binary" is your "binary"? (Or, to be more accurate, how ASCII is it?)

The other approach would be to invent your own escaping system for the
control characters (either as special elements, or as some syntax in the
text such as the old ^C for control-C), use XML's escapes for the few
other ASCII characters which need special handling, and let the schema
just declare it as a string. Depending on what you're doing that might
be significantly more compact than the base-64 solution.


--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
 
Reply With Quote
 
shashidhar.yarlagadda@gmail.com
Guest
Posts: n/a
 
      02-27-2008
On Feb 26, 2:23*pm, (E-Mail Removed) wrote:
> On 26 Feb, 18:24, (E-Mail Removed) wrote:
>
> > hi,

>
> > hey! i am writing an XML Schema Defination where i got a sistutation
> > in such way that i need to defina a tag that should hold binary data
> > (ASCII data). How can i handle this sistutation? I mean what datatype
> > i need to mention.
> > i saw the base64Binary data type but it will not support all the ascii
> > characters right? In this scenario can any one please give me a
> > thought?

>
> > Thanks much,
> > Sha

>
> hexBinary is another alternative. *It's simpler than base64Binary, but
> not as efficient. *You can read about how they encode data at:
>
> http://www.w3.org/TR/xmlschema11-2/#.../#base64Binary
>
> Refer to the referenced IETF RFC (http://www.ietf.org/rfc/rfc3548.txt)
> to find out how base64 is encoded.
>
> HTH,
>
> Pete Cordell
> Codalogic
> For XML C++ data binding visithttp://www.codalogic.com/lmx/


Thanks much for the information.
 
Reply With Quote
 
shashidhar.yarlagadda@gmail.com
Guest
Posts: n/a
 
      02-27-2008
On Feb 26, 3:08*pm, Joseph Kesselman <(E-Mail Removed)>
wrote:
> How "binary" is your "binary"? (Or, to be more accurate, how ASCII is it?)
>
> The other approach would be to invent your own escaping system for the
> control characters (either as special elements, or as some syntax in the
> text such as the old ^C for control-C), use XML's escapes for the few
> other ASCII characters which need special handling, and let the schema
> just declare it as a string. Depending on what you're doing that might
> be significantly more compact than the base-64 solution.
>
> --
> Joe Kesselman / Beware the fury of a patient man. -- John Dryden


Thanks much for the information.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
psycopg2 insertion and reading binary data to PostgreSQL database(bytea datatype) romap@libero.it Python 0 03-01-2011 10:57 AM
database datatype bit what is the C# datatype? Jeff ASP .Net 2 04-16-2007 08:26 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
XML + XSD: Is it possible to get all errors against the XSD? Markus Java 1 11-22-2005 02:53 PM
Re: ostreams, ios::binary, endian, mixed binary-ascii Marc Schellens C++ 8 07-15-2003 12:27 PM



Advertisments