I have the following xml:
<RootLevel>
<Level1 type="Integer" value="0x53494553"/>
<Level1 type="Float" value="0x07"/>
<Level1 type="Short" value="0x0002"/>
<Level1 type="Short" value="0x0000"/>
<RootLevel>
Respect to this xml, i get the Type value and cast them with no problem. But when i try to parse the hexadecimal values with
Convert.ToInt32(node.Attributes["value"].Value)
or
Convert.ToInt32(node.Attributes["value"].Value,NumberStyles.HexNumber)
or
int.Parse(node.Attributes["value"].Value)
or
int.Parse(node.Attributes["value"].Value, NumberStyles.HexNumber)
It gives the following error:
Input string was not in a correct format.
In case i am trying to parse into integer but for every dataType it will be similar. Parsing for integer help is enough.
What am i missing here?