c# - Can't resolve namespace while parsing a XML wih XDocument -


I need some help in parsing this XML.

I get the following string and I need to get the value of "MensajeError"

   

I have made it on physical tags but I do not manage to parse under XML

  var xDocument = XDocument.Parse (resultado) can; X-namespace soap = "http://schemas.xmlsoap.org/soap/envelope/"; Var xElements = xDocument.Descendants (Soapenby + "Body"). First ()  

The tag that I tried to parse "" failed. I just need to retrieve the "Mentass Aror" tag

Thanks!

You can just use the local name:

  Var nodeValue = XDocument.Parse (resultado). Dscendants () First (n = & gt; n.Name.LocalName == "MensajeError"). value; // nodeValue = "error1"  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -