Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XML hexBinary to byte[]
Message
General information
Forum:
ASP.NET
Category:
XML
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
01165151
Message ID:
01166754
Views:
17

It IS hexBinary data. I created it. You did not treat the XML data as Base64Binary but the converted data (byte[]) in the dataset


I know *exactly* what I did. My point is that when I treated it that way the results MATCHED what you created in your incoming XML.

IOW, you may think that you have created "hexBinary" data in that XML, but from what I saw you had not. When I treated it as something other than "hexBinary", according to what it looked like rather than what you *said* it was (as well as what the XSD said it *should* be), et voila, I got the results you are after: a decoded result that matched exactly what you showed in your file.

Which *could* have meant, as I told you before, that the XSD was simply incorrect.

Since you tell me that the XSD *is* correct, then the incoming data --no matter who created it -- is not what it is supposed to be and some other work is clearly necessary.

One possible way to handle it would be to use an XML reading mode that provides an explicit schema. This was simply a suggestion, based on the idea that you may not be able to control the data that is coming in. If that is so, and if the incoming XML does not contain a payload of the data type it is supposed to have, then you could potentially use an explicit alternative schema to tell the reader what to expect instead.

I am not angry, but I am trying to explain what I can to you, and I can't do anything more than that <s>. Listing the XML modes and expecting me to continue in this line is not reasonable; I don't have any incentive to do this research for you, since (as I have explained) I would never use the results of this particular line of research myself, and no interest in it. Does this make sense to you?

I will also tell you, although you assure me that the XSD is correct, that your document does not appear to be valid according to that XSD in at least one other way. Your XSD indicates an element named Assignments, enclosing a sequence of Asssignment nodes. However your incoming XML does not have any Assignments node, it has nested Assignment nodes.

So... all in all, something, or several things, appear to be wrong with the incoming XML. The fact that you created it doesn't change that, and there is nothing else I can do to help you.

>L<
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform