I need to search an XML file for a unique entry. I've never worked with XML before. Can anyone tell me what the fastest way to search an XML file is? For the website I'm working on performance is critical so I need that fastest possible way to get this data. For this particular search, all I need is to get the text inside of <TERM> based on the string id ("entry_id" in the XML file).
string getTermName(string id); label.text = getTermName("0001");
Here is a sample of how the XML file is structured.
<?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE GLOSSARIES SYSTEM "glossary.dtd"> <GLOSSARIES> <GLOSSARY language="English"> <ENTRY entry_id="0001"> <TERM>Term Name</TERM> <DEFINITION> A text definition of Term Name. </DEFINITION> <TOOL>PlanFinder</TOOL> </ENTRY> </GLOSSARY> </GLOSSARIES>