469,625 Members | 1,444 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

XSD datatype for binary ASCII data for a Tag in XML

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
Feb 26 '08 #1
5 3416
sh*******************@gmail.com 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/
Feb 26 '08 #2
On 26 Feb, 18:24, shashidhar.yarlaga...@gmail.com 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/
Feb 26 '08 #3
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
Feb 26 '08 #4
On Feb 26, 2:23*pm, use...@tech-know-ware.com wrote:
On 26 Feb, 18:24, shashidhar.yarlaga...@gmail.com 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.
Feb 27 '08 #5
On Feb 26, 3:08*pm, Joseph Kesselman <keshlam-nos...@comcast.net>
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.
Feb 27 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ferran Foz | last post: by
10 posts views Thread by J. Campbell | last post: by
13 posts views Thread by greg | last post: by
6 posts views Thread by SandyMan | last post: by
6 posts views Thread by as400tips | last post: by
11 posts views Thread by Freddy Coal | last post: by
5 posts views Thread by dm3281 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.