PDA

View Full Version : Convert from String to XML object


kminev
07-01-2008, 07:45 PM
I have a web service which returns string object.

The string return is in the following format:

<Accounts>

<Acc>

<Name>A1<ID>7</ID></Name>

</Acc>
</Accounts>

and this data is coming as a string from web service.

Is there a way I can convert this string to an xml of ArrayCollection so I can use it and bind it to combobox?

Thank in advance.

box86rowh
07-01-2008, 09:45 PM
Thats some odd xml, the way the id is nested in there seems off..are you sure this is your xml?

kminev
07-01-2008, 10:45 PM
Thanks for the catch I fixed that part with the xml structure.

But my problem still remains the same. String to XMl convertion. Or bind xml to combo box as a dataprovider. When I try to assign the xml which in turn comes from a string to combo box I get one item on my combo box containing the entire xml structure.

any advices?

kminev
07-02-2008, 02:48 PM
Thanks for the catch after I fixed my xml structure it worked fine.