I need to display the processingStatus and every field node value along with it's corresponding name of the following XML.
<?xml version="1.0" encoding="UTF-8"?>
<T24 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.temenos.com/T24/OFSML/130" xsi:schemaLocation="http://www.temenos.com/T24/OFSML/130 ofsml13.xsd">
<serviceResponse>
<ofsTransactionProcessed application="FUNDS.TRANSFER" function="INPUT" operation="VALIDATE" processingStatus="OK" version="BOOK.TRAN.VAL.MCB">
<transactionId>FT15056T2QLP</transactionId>
<field mv="1" name="TRANSACTION.TYPE" sv="1">AC</field>
<field mv="1" name="CURRENCY.MKT.DR" sv="1">1</field>
<field mv="1" name="DEBIT.CURRENCY" sv="1">USD</field>
<field mv="1" name="DEBIT.AMOUNT" sv="1">125.00</field>
<field mv="1" name="DEBIT.VALUE.DATE" sv="1">20150225</field>
</ofsTransactionProcessed>
</serviceResponse>
</T24>
Can anyone help me please? my code: EDITED CODE:
XmlTextReader reader = new XmlTextReader("XML03.xml");
Console.WriteLine(reader.Attributes["processingStatus"].Value);
while (reader.Read())
{
Console.WriteLine(reader.Value);
}
Console.ReadLine();