Question:

C# ==> Converting text to xml ?!?!?

by  |  earlier

0 LIKES UnLike

I'm sending some text through socket connection like

<user>user1</user><user>user2</user>

Is it possible to convert this text to xml so that i can search or loop through it?

Thanks

 Tags:

   Report

2 ANSWERS


  1. string str = &quot;&lt;user&gt;asdasd&lt;/user&gt;&quot;;

    xmlObject xml = new xmlObject();

    xml.loadXml(str);


  2. I don&#039;t understand your question - you want to convert it to xml, but you don&#039;t want it in xml? Why would you not want it in xml, especially if that is the native format?

    No matter what you decide to do, you are going to have to use some 3GL or scripting language like JavaScript to do the looping you are talking about. Seems to me like it would be easier with xml, as the data structure is easier to pick thru....  am I missing something here?

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions