I am planning to use XPath to query an XML file. Can you please point me to a link which states the advantages of using XPath? Will the use of XPath improve performance?
I am using .NET Framework 2.0. At present I am iterating through the node.
XmlReaderSettings settings = new XmlReaderSettings();
settings.IgnoreWhitespace = true;
XmlReader reader = XmlReader.Create("mydata.xml", settings);
XmlReader inner;
while (reader.Read())
{
if (reader.Name == "xyz" && reader.NodeType == XmlNodeType.Element)
{
inner = reader.ReadSubtree();
inner.Skip();
inner.Read();
......... //some changes to node
inner.Close();
}
}
reader.Close();