public XmlNodeList GetNodes(string _logFilePath, string _strXPathQuery)
{
objXmlDoc = new XmlDocument();
objXmlDoc.Load(_logFilePath);
XmlNodeList objxmlNodeList = objXmlDoc.SelectNodes(_strXPathQuery);
return objxmlNodeList;
}
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<AppXmlLogWritter>
<LogData>
<LogID>999992013021110381000001</LogID>
<LogDateTime>20130211103810</LogDateTime>
<LogType>Message</LogType>
<LogFlag>Flag</LogFlag>
<LogApplication>Application</LogApplication>
<LogModule>Module</LogModule>
<LogLocation>Location</LogLocation>
<LogText>Text</LogText>
<LogStackTrace>Stacktrace</LogStackTrace>
</LogData>
</AppXmlLogWritter>
Here Xml file size is 1000MB when i load it into xmlDocument object then gives me an OutOf memory exception.because XMLDocument stores nodes into Memory .I use Xpath query to filter the nodes throughtout xml file.And then bind to listview to dispaly nodes. I read articles regarding how TO HANDLE LARGE XML FILES they told me use XpathQuery. but the problem doesnt solve. what about filestream? or any other idea to load large xml files?*