XSD datatype for binary ASCII data for a Tag in XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shashidhar.yarlagadda@gmail.com

    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
  • Martin Honnen

    #2
    Re: XSD datatype for binary ASCII data for a Tag in XML

    shashidhar.yarl agadda@gmail.co m 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

    Comment

    • usenet@tech-know-ware.com

      #3
      Re: XSD datatype for binary ASCII data for a Tag in XML

      On 26 Feb, 18:24, shashidhar.yarl aga...@gmail.co m 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:




      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/

      Comment

      • Joseph Kesselman

        #4
        Re: XSD datatype for binary ASCII data for a Tag in XML

        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

        Comment

        • shashidhar.yarlagadda@gmail.com

          #5
          Re: XSD datatype for binary ASCII data for a Tag in XML

          On Feb 26, 2:23 pm, use...@tech-know-ware.com wrote:
          On 26 Feb, 18:24, shashidhar.yarl aga...@gmail.co m 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:
          >

          >
          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.c om/lmx/
          Thanks much for the information.

          Comment

          • shashidhar.yarlagadda@gmail.com

            #6
            Re: XSD datatype for binary ASCII data for a Tag in XML

            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.

            Comment

            Working...