XML Deserializing

rupesh

New Member
I am doing xml string deserializing in to class. But it is not happening. Here is my sample xml:\[code\]<Transaction> <tag1 val1="1" val2="2"> <subtag>somestring</subtag> </tag1><Transaction>\[/code\]I have created class like this:\[code\][Serialzable]Class Transaction{ [xmlElement] public string tag1;}[Serialzable]Class tag1{ [xmlAttribute] public string val1; [xmlAttribute] public string val2; [xmlAttribute] public string subtag;}\[/code\]Now when i m deserializing, everything working correctly except subtag value. Its coming null into object. I tried to make it XMLElement and XMLAttribute both but no success.Can anyone please let me know how to handle this value?Thamk you in advance.
 
Top