Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. How to specify a Hex value in XML?

How to specify a Hex value in XML?

Scheduled Pinned Locked Moved XML / XSL
xmltutorialquestion
3 Posts 3 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Frank W Wu
    wrote on last edited by
    #1

    I have an integer attribute declared in the xsd file. In the xml file, I need to use hex for the value. I can’t find info about the syntax about hex value.
    I tried something but neither
    <MyData MyValue="0x52590"/> nor <MyData MyValue="#52590"/> works. Any clues are appreciated.

    PJ ArendsP J 2 Replies Last reply
    0
    • F Frank W Wu

      I have an integer attribute declared in the xsd file. In the xml file, I need to use hex for the value. I can’t find info about the syntax about hex value.
      I tried something but neither
      <MyData MyValue="0x52590"/> nor <MyData MyValue="#52590"/> works. Any clues are appreciated.

      PJ ArendsP Offline
      PJ ArendsP Offline
      PJ Arends
      wrote on last edited by
      #2

      <MyData MyValue="0x52590"/>

      Independent ACN Business Owner

      Make toll free long distance calls from your smart phone with ACN Mobile World.
      When connected via wifi, calls will not use any of your minutes or data, nor will there be any roaming charges.
      Certain conditions apply. See my website for details.


      Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      • F Frank W Wu

        I have an integer attribute declared in the xsd file. In the xml file, I need to use hex for the value. I can’t find info about the syntax about hex value.
        I tried something but neither
        <MyData MyValue="0x52590"/> nor <MyData MyValue="#52590"/> works. Any clues are appreciated.

        J Offline
        J Offline
        jschell
        wrote on last edited by
        #3

        Frank W. Wu wrote:

        I have an integer attribute declared in the xsd file. In the xml file, I need to use hex for the value. I can’t find info about the syntax about hex value.

        Because that isn't possible. Definition of an 'int' is a optional sign followed by decimal digits. Nothing else. The definition. http://www.w3.org/TR/xmlschema-2/#int[^] In terms of a solution - convert the hex value to an integer or change the xsd.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups