0

I want to read my xml file from a webpage(www.example.com/myxmlfile.php) and convert it to an xml like below to parse it

string xml1 =
    "<root>" +
    "<users>" 
    "<ID>1</ID>" +
    "<user_login>admin</user_login>" 
    "<user_pass>$P$Bdfdffddkjlkiyuyadnvjd</user_pass>" +       
    "<term_id>2</term_id>" +
    "<user_activation_key></user_activation_key>" +
    "<user_status>0</user_status>" + 
    "<display_name>admin</display_name>" +
    "</users>" +
    "</root>";

How can I do that? Reading data and converting to a string with pluses in exact position n c# Thanks beforehand.

tbp
  • 85
  • 1
  • 1
  • 7
  • There are a lot of classes in NET that deal with XML files. Your question is too vague (in particular on the parsing objectives) but you could check on XMLReader or XMLDocument – Steve Aug 18 '16 at 08:02
  • 1
    Look here http://stackoverflow.com/questions/6161159/converting-xml-to-string-using-c-sharp/13026108#13026108 – vivek kv Aug 18 '16 at 08:05
  • Take a look at XDocument: https://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument(v=vs.110).aspx – sr28 Aug 18 '16 at 08:08

0 Answers0