I have an xml flow wit h this structure :
<TagNames>
<TagName id="A1">some text...</TagName>
<TagName id="A2">some text...</TagName>
<TagName id="An">some text...</TagName>
</TagNames>
What’s the best way to get only one node by ‘id’ without looping the entire file ?
Linq to Sql, Xpath… I am using C#
Thanks
In XPath this is immediate:
You can use it with XMLDocument.SelectSingleNode of System.Xml: