score:0
//select <option> node based on id attribute of it's parent & subid attribute of it's own
var nodetoedit = xml.descendants("option")
.firstordefault(x => (string)x.parent.attribute("id") == "123"
&&
(string)x.attribute("subid") == "4"
);
Source: stackoverflow.com
Related Query
- How to change value of child element based on attribute of child and parent?
- Get child node attribute value based on parent node attribute value
- Selecting nth child element based on parent elements attribute
- c# linq to xml: add child element to specific parent element based upon value
- How do I retrieve the value of an attribute in a parent if one of the elements of a child equals to a value?
- How to approach querying a parent table based on values in a child table and a child tables related data table?
- How to get value from a parent class and a nested array child using linq?
- C# Linq2XML get parent attribute from child element value
- how to get child element attribute value from xml to linq in c#
- How to use XDocument and Linq to read in a list of parent attribute concatenated with child comment
- How to get parent and only one child node
- how to change the value of dictionary using linq based on key?
- How to return both parent and child using LINQ against 1 table
- How do you sort a parent and child collection using Linq?
- Select Parent XML Elements based on Child element values LINQ C#
- How to Remove elements from one List based another list's element and condition?
- LINQ: Given A List of Objects, Create a Dictionary with child objects as keys and Parent Objects as Value
- How to get the exact child element with corresponding parent only from multilevel embedded MongoDB document using C#
- How to combine LINQ group and ordering with parent and child tables?
- How to best extract attribute values and element values with LINQ and C#
- get attribute value from multiple elements with same name and attribute value of one other element in xml
- How to get value of element via attribute in Linq
- Obtain child node based on attribute of parent node
- Linq 2 XML not returning element based in attribute value
- select and update based on a child objects property minimum value using Linq
- How to write an efficient LINQ query when searching by both parent and child entity fields
- How to set where condition on parent and child table
- How to select child nodes when parent node equals a specific value in LINQ to XML
- How to change tag name and get attribute using linq-to-xml
- How do I use LINQ to filter AND manipulate results based on values intersecting between a child and comparer?
More Query from same tag
- LINQ Query - Where has child items
- Whats the proper way to check to see if an entry in a db table is null?
- Distinct values in linq with join clause
- Trouble mapping to DTOs with LINQ
- Return List with Maximum Count using Linq
- sum of one column with condition using linq
- How to make my linq to entities query for sum faster
- What datastructure would you use to represent this format of data?
- Using a native SQL Server function in Nhibernate?
- Is it possible to enumerate for all permutations of two IEnumerables using linq
- Display Parent Values if Specified Child Values are NULL
- How do I GroupBy from two Lists?
- LINQ ToList().Take(10) vs Take(10).ToList() which one generates more efficient query
- C# Data Transformation on Single Object
- LINQ - Left Join, Group By, Sum,
- Library for parsing XHTML files with XLINQ
- Left join after a into group in Linq using entity framework (core)
- Transforming two queries into one query in LINQ
- EF6/Code First and indexes: Is there anything special to do to access/use indexes?
- Generic method to compare/filter two lists using expressions/lambda
- How to do datatemplate for items in listbox?
- EF - How to edit the below model using linq?
- id entering as 0 in database in MS SQL Server
- how to do a simple subquery in LINQ?
- ASP.NET MVC Controller won't catch exceptions from LINQ lambda
- How to find an element in nested child array document in MongoDB using c#
- LINQ/Lambda query help for SQL Group By + MAX?
- LINQ : Check for NullReferenceException
- How do I LINQify this?
- Filter data quarterly using LinQ