Questions tagged [linq-to-xml]

LINQ-to-XML provides a SQL-like query experience for navigating, parsing, and aggregating data stored in XML documents.

LINQ-to-XML provides a SQL-like query experience for navigating, parsing, and aggregating data stored in XML documents.

Related Links

5019 questions
1
vote
3 answers

C# Returned .XML to class

I am tring to give an information from friendfeed API. As you see in code, I am using an HttpRequest to get information. It's ok. After that I am reading XML just fine with LINQ. But now I create a "feed" class and I want to create an object for…
1
vote
3 answers

LINQ to XML query ignorance

Very new to LINQ to XML. I have the following document:
Sergio Romero
  • 6,477
  • 11
  • 41
  • 71
1
vote
2 answers

How to parse xml

I have the xml code:
revolutionkpi
  • 2,632
  • 10
  • 45
  • 84
1
vote
1 answer

How to find an Element, not knowing how deep it is nested using Linq to XML?

I have XML document that is like this: 4075981 Nutrition Bars 4075971 Nutrition Bars &…
Joe Tyman
  • 1,417
  • 5
  • 28
  • 57
1
vote
2 answers

Need to find an attribute value

Navyseal
  • 891
  • 1
  • 13
  • 36
1
vote
3 answers

LINQ to XML without knowing the nodes

I have this LINQ query: XNamespace ns = NAMESPACE; var items = (from c in doc.Descendants(ns +"Item") select new Item { Title = c.Element(ns + "ItemAttributes").Element(ns + "Title").Value, MFR = c.Element(ns +…
Joe Tyman
  • 1,417
  • 5
  • 28
  • 57
1
vote
1 answer

Fillter and copy XML nodes using Linq to XML

At the end the goal is to creat a new XML file filtered from a whole list of NODES by comparison each noed attribute value with existing values​​ list. my problem is: I can read the value of a particular node and then compare it with a dynamic…
asafok
  • 11
  • 1
1
vote
1 answer

Issue with LINQ to XML

have a XML file like this: LRC_AL_CLINICALTCODE LRC_AL_PATALGHISTRY LRC_AL_PATALGYCODE
sanar
  • 437
  • 9
  • 22
1
vote
2 answers

Having issue parsing xml with linq to xml

I am having a problem parsing xml that I receive from Web Service. The xml looks very simple:
Dmitris
  • 3,408
  • 5
  • 35
  • 41
1
vote
1 answer

Is there an equivalent of System.Xml.XmlAttribute.Specified in System.Xml.Linq?

I have to re-write a large project that uses classes from the System.Xml-Namespace to use the respective classes from System.Xml.Linq using .NET-3.5. One the functions use the System.Xml.XmlAttribute.Specified property to find all attributes that…
miasbeck
  • 1,046
  • 9
  • 14
1
vote
2 answers

linq to xml

want to query below xml 1 Day
Sreedhar
  • 29,307
  • 34
  • 118
  • 188
1
vote
2 answers

how to write this query for this xml data in linq to xml?

i've been reading through the linq to xml documentation in msdn and some other tutorials and yet i failed to find the right way to do this query as of now :( Basically, i want to loop through each student in the class, for each question, keep a…
melaos
  • 8,386
  • 4
  • 56
  • 93
1
vote
1 answer

XElement.Add(XElement) automatically adds namespace to child node?

I am using XElement to manipulate my xml file: to find target node and then add child node to it. But now I have one problem. Let's say my xml file looks like this: 100 100
tete
  • 4,859
  • 11
  • 50
  • 81
1
vote
1 answer

Finding nodes with "missing" attributes

I have xml that looks like this: Fred Bill John I can write LINQ to find the type="One" nodes. (or…
dac
  • 57
  • 7
1
vote
1 answer

Read Child nodes including text and node using XPath from XElement ? LinQ

Using old way of doing via XmlDocument, string xmlstring = "John23"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(xmlstring); string childNodes =…
DotNetDeveloper
  • 587
  • 2
  • 9
  • 19