score:3
Accepted answer
Something like this:
var rawProperties = customerXml.Descendants("property")
.Select(arg =>
new
{
UnitBalance = arg.Element("unit-balance").Value,
Registers = arg.Descendants("dials").Select(x => x.Value).ToList()
})
.ToList();
Source: stackoverflow.com
Related Query
- How to use LINQ to XML to retrieve nested arrays?
- How to use Linq to group, sum or retrieve total. My current code returns nothing
- How to I use TryParse in a linq query of xml data?
- LINQ to XML - How to use XDocument the right way
- Parsing SOAP response with LINQ to XML - how to get nested nodes under parent?
- How does linq actually execute the code to retrieve data from the data source?
- How can I switch that code to use LINQ
- How to write this nested Linq To Xml query
- How can I use LINQ to Entities (with a transform) to return a nested dataset?
- How to parse XML header and nested sections using LINQ
- How can I use Linq to build a c# object from xml where an element has zero or more elements of the same type?
- How can i use "like" in linq to xml
- How do I use LINQ to XML to create a list of objects?
- c# How to use linq to get xml string by filtering some data?
- How to use LINQ to XML for receiving data in List format
- How to Retrieve XML using Linq Lambda?
- How to use LINQ to convert a xml file in to an object
- How to flatten a multi level XML into a single level XML using c# code LINQ
- How would I use LINQ to XML to get the value from example XML
- How can I use LINQ to filter a collection of nested classes to yield a dictionary of unique properties of those classes?
- How do I use LINQ to select a collection of inner XML nodes?
- How do I use LINQ to parse XML with child elements of the same name?
- c# linq xml how to use two prefixes for same namespace
- How to use LINQ to read XML that contains xincluded files?
- How do I use Linq to query nested dynamic BsonDocuments?
- How do I use Linq to read XML
- How to retrieve multiple let linq to xml c#
- How to use LINQ to query a complex XML document?
- How can I use LINQ to retrieve entries that contain a specific property of a list within a list?
- How to join two arrays in a LINQ query and use the result further in the query?
More Query from same tag
- Why NULL values are excluded while selecting values from table
- c# filter for multiple lines
- 'System.Collections.Generic.IEnumerable<short>' does not contain a definition for 'Sum'
- Read XML Attribute
- Linq with boolean function to relational db in Entity Framework
- LINQ Any() argument versus parameter data type issues
- Return list of specific property of object using linq
- How I get id and total value of dynamically created text boxes?
- Linq spit numeric list in search (kentico)
- Can you create objects from a groupBy query?
- Join a list with an entity and get the average from the second table
- NullReferenceException Include LINQ expression MVC3
- How to merge two classes into single unit?
- LINQ to SQL inserting large object from .NET
- Why do I get duplicate keys as using groupby LINQ
- How do I use LINQ Contains(string[]) instead of Contains(string)
- Is it possible to do this.Sort(p => p.ID); or something similar?
- How do I make LINQ queries to an SQLite database?
- Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting Entity Data Model primitive types
- Why does trying to access an attribute in LINQ-to-XML give me an error?
- How to select a list of files which matches multiple Regular Expressions?
- In WebAPI POST method how to pass Id which is set to Uniqueidentifier in database ASP.NET?
- LINQ query returning the entire object grouped by multiple columns when one is distinct
- Write where condition inside Include in linq query
- Compare 2 tables for changes in each columns
- Dynamic Column Name in LinQ
- Ignore return type from a Expression.Call
- Any plans for "do"/Action LINQ operator?
- Get string representation of a Linq To Objects Query
- How do I fix my linq query