I have a 30meg+ staic XML datafile. What I need to do is read only one node from that data file into memory. That data node will only at most 2 or 3k in size. I do not have to load any other portion of the XML file into memory other than the found node. What are my fasted (performance) options. The method I was using was loding the entire document into memory before any node searching occured. Yikes, that was slow and really did not find the required node. I was using an XMLDocument like below
Dim doc As XmlDocument = New XmlDocument
Dim output As String = ""
output = doc.SelectSingleNode("//LAYOUT-TYPE[@Name='" & layoutName & "']" & _
"//LAYOUT[@Name='" & layout& "']" & _
"//TABLE[@Name='" & table & "']").OuterXml
Catch ex As Exception
Loading this enitre document into memory is just plain bad idea. It is extremely slow. One need to read this file like and pick the required node. The problem is I am new at XML and don't know how to do this.