Top "Xelement" questions

XElement is part of System.

How to get XElement's value and not value of all child-nodes?

Sample xml: <parent> <child>test1</child> <child>test2</child> </…

c# xelement
How to Read a specific element value from XElement in LINQ to XML

I have an XElement which has content like this. <Response xmlns="someurl" xmlnsLi="thew3url"> <ErrorCode>&…

c#-4.0 linq-to-xml xelement
How to get specific value from a xml string in c#

I have following string <SessionInfo> <SessionID>MSCB2B-UKT3517_f2823910df-5eff81-528aff-11e6f-0d2…

c# xml string xelement
How to Get Element Names from XElement Using C#?

I have a Xml and i have to get the element name <Data> <Test key="G" modifier="…

c# linq-to-xml xelement
c# how to read xml attributes with xelement

I have a XML with this string: <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.…

c# xml windows-phone-7 xelement
Read text content from XElement

In .NET, how do I read the text content from an XElement? For example, from the XElement XElement.Parse("<…

c# .net xml linq xelement
XElement.Load("~/App_Data/file.xml") Could not find a part of the path

I am new in LINQtoXML. I want to use XElement.Load("") Method. but the compiler can't find my file. can …

c# asp.net path linq-to-xml xelement
Converting the children of XElement to string

Possible Duplicate: Best way to get InnerXml of an XElement? I am using an XElement to hold a block of …

c# xml xhtml innerhtml xelement
How to read an xml file directly to get an XElement value?

Right now I am using: XElement xe = XElement.ReadFrom which requires an XmlReader: XmlReader reader = XmlTextReader.Create which requires a …

c# .net xmlreader xelement
Removing XElements in a foreach loop

So, I have a bug to remove foreach (XElement x in items.Elements("x")) { XElement result = webservice.method(x); if (/*…

.net c#-3.0 foreach xelement