Suppose I have an XML file that I use as a local database, for example:
<root>
<address>
<firstName></firstName>
<lastName></lastName>
<phone></phone>
</address>
</root>
I have a couple of questions:
1. What will be the fastest way to find the address (or addresses) in XML, where firstName contains "er", for example?
2. Is it possible to do without the integral loading of an XML file into memory?
PS I'm not looking for alternatives to XML files, ideally I need a search that does not depend on the number of addresses in the XML file. But I am a realist, and it seems to me that this is impossible.
Update:
I am using .net 4
Thank you for the suggestions, but this is a more scientific task than practical. I'm probably looking for faster ways than linq and xmltextreader.
source