Conversion to xml
-
I want to convert a string str="ABC=100 BC C=50" to xml as 100 = Is it possible? bidisha
-
I want to convert a string str="ABC=100 BC C=50" to xml as 100 = Is it possible? bidisha
if everything is going to be space delimited then it's definately possible.
string s = "abc=100 bc c=50 def=20"
string[] strings = s.Split(" ");This will give you an array of xml elements split at each space " ". Then you've just gotta go through each one and work out whether or not it has an operator and create your xml file. Just make sure that the only spaces in the string are between elements, if you need spaces elsewhere then use a different character like a comma.
string s = "abc=100,bc,c=50,def=20"
string[] strings = s.Split(",");Cheers Kev
-
I want to convert a string str="ABC=100 BC C=50" to xml as 100 = Is it possible? bidisha