I have a string like this: "<Root><Child>Hey</Child></Root>"
"<Root><Child>Hey</Child></Root>"
How can I convert this to an XElement Object?
XElement
Use XElement.Parse method like below
XElement xmlTree = XElement.Parse("<Root><Child>Hey</Child></Root>"); Console.WriteLine(xmlTree);
Possible Duplicate: Children of XElement I want to get child elements from XElement using C#. How can this be done?
I have an XElement that looks like this: <User ID="11" Name="Juan Diaz" LoginName="DN1\jdiaz" xmlns="http://schemas.microsoft.com/sharepoint/soap/directory/" /> How can I use XML to extract the value of the LoginName attribute? I …
So let's assume this is what i want to achieve: <root> <name>AAAA</name> <last>BBBB</last> <children> <child> <name>XXX</name> &…