Updated: I can only step down to the first value node in my XML. The code below gets to the first value node and shows data, but how would I select another node? I only need 3 values at the moment from each item node.The Tax Year, Bill number, and appl_amt, along with the image path are the only values I am working on retrieving. The Xml added is only a portion. The section added repeats several times until the BatchCompiler/Batch/transactions/transaction tags close the groupings.
<?xml version="1.0"?>
<BatchCompiler>
<batch>
<batchid>95531</batchid>
<transactions>
<transaction>
<items>
<item>
<values>
<value>
<name>doc_type</name>
<data>1</data>
</value>
<value>
<name>doc_id</name>
<data>10</data>
</value>
<value>
<name>Bill Base Number</name>
<data>0007956700</data>
</value>
<value>
<name>Tax Year</name>
<data>2015</data>
</value>
<value>
<name>Year For</name>
<data>2015</data>
</value>
<value>
<name>Listing Type</name>
<data>0000</data>
</value>
<value>
<name>Postmark Date</name>
<data>08212015</data>
</value>
<value>
<name>appl_amt</name>
<data>18.12</data>
</value>
<value>
<name>tran_num</name>
<data>1</data>
</value>
<value>
<name>tran_seq</name>
<data>1</data>
</value>
</values>
<image>..\images\95531_1_S_1.tif</image>
</item>
namespace GETZIP2
{
class Program
{
static void Main(string[] args)
{
XmlDocument doc = new XmlDocument();
doc.Load("\\example\\index.xml);
MessageBox.Show(doc.SelectSingleNode("BatchCompiler/batch/transactions/transaction/items/item/values/value").InnerText);
}
}
}