[xsd-users] Re: hexBinary basic question
Laura E Fowler
Laura_E_Fowler at raytheon.com
Thu Aug 27 15:52:04 EDT 2009
Yes, I did do something stupid. I used the value before it was set, so it
was just a simple (stupid) coding error. I did have to put it into
big-endian, but that's to be expected.
Now it's working like I expected it to work.
Sorry for bothering everyone.
Laura
From:
Laura E Fowler/US/Raytheon
To:
xsd-users at codesynthesis.com
Date:
08/27/2009 12:46 PM
Subject:
hexBinary basic question
I'm sure that I'm doing something stupid, but I'm having trouble using
hexBinary.
I have an uint64_t CRC value that is to be represented in hexBinay, so the
xsd has the field defined as:
<xsd:element name = "DataResidue" type = "xsd:hexBinary"/>
I'm converting my uint64_t value to hexBinary as follows:
xml_schema::hex_binary((void *)(&dataResidue),sizeof(dataResidue))
I'm running on a little-endian system, so I have tried converting my
uint64_t to big-endian. Neither little-endian or big-endian gave me what I
expected.
For example:
If my CRC contains the value of: 0x2d8ab0bc260ef5a
I get a hexBinary of: <DAR:DataResidue>0106000030706040</DAR:DataResidue>
Can you please point me in the correct direction? I've searched the
archives, but didn't find anything that helped much.
Thanks,
Laura
More information about the xsd-users
mailing list