Top "Linq-to-xml" questions

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

Understanding Linq To Xml - Descendants return no results

I'm a completly New to Linq2XML as I code to much lines to perform simple things, and in a …

c# linq-to-xml
Jaxb equivalent in C#

Using JAXB in Java it is easy to generate from a xml schema file a set of Java classes that …

c# linq linq-to-xml jaxb
How to add more Attribute in XElement?

I have a data structure as under class BasketCondition { public List<Sku> SkuList { get; set; } public string InnerBoolean { …

c#-4.0 linq-to-xml xattribute
Sorting all the elements in a XDocument

I have a XDocument where I'd like to sort all of the elements alphabetically. Here's a simplified version of the …

c# sorting linq-to-xml
How do I add multiple Namespace declarations to an XDocument?

I'm using an XDocument to build an Xml document in a known structure. The structure I am trying to build …

c# xml linq-to-xml
XDocument.Load(XmlReader) Possible Exceptions

What are the possible exceptions that can be thrown when XDocument.Load(XmlReader) is called? It is hard to follow …

c# xml exception linq-to-xml
XElement adds an xmlns

I'm using Linq to XML to create a new XML file. Some part of the file do I get from …

c# xml linq linq-to-xml xml-namespaces
How do I set namespace attributes on an XElement

I need to add the following attributes to an XElement: <xmlns="http://www.mysite.com/myresource" xmlns:xsi="http://…

.net xml linq-to-xml
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
How to convert XML to Dictionary

I've xml as following: <?xml version="1.0" encoding="UTF-8"?> <root> <data name="LogIn">Log In&…

c# xml linq linq-to-xml