View Single Post
  #1 (permalink)  
Old May 29th, 2007, 02:41 AM
balaguru balaguru is offline
Registered User
 
Join Date: May 2007
Location: chennai, , India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem in reading xml database

hi i am trying to read the following xml file


<SessionRequest schemaLocation="\WEB-INF\xml\schema\Application.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requestType>APPLICATION</requestType>
<token></token>
<requestArguments>
<Application>
<companyId>TT0010001</companyId>
<requestType>APPLICATION</requestType>
<application>FUNDS.TRANSFER</application>
<version>,BM</version>
<Function>I</Function>
<Operation>PROCESS</Operation>
<transactionId>NEW</transactionId>
<compScreen>MAIN</compScreen>
<message>
<field>
<fieldName>TRANSACTION.TYPE</fieldName>
<value>AC</value>
</field>
<field>
<fieldName>DEBIT.ACCT.NO</fieldName>
<value>0110000020000005</value>
</field>
<field>
<fieldName>DEBIT.CURRENCY</fieldName>
<value>USD</value>
</field>
<field>
<fieldName>DEBIT.AMOUNT</fieldName>
<value>78</value>
</field>
<field>
<fieldName>DEBIT.VALUE.DATE</fieldName>
<value>20061005</value>
</field>
<field>
<fieldName>CREDIT.CURRENCY</fieldName>
<value>USD</value>
</field>
<field>
<fieldName>CREDIT.VALUE.DATE</fieldName>
<value>20061005</value>
</field>
<field>
<fieldName>CREDIT.ACCT.NO</fieldName>
<value>0110000020000017</value>
</field>
<field>
<fieldName>CHARGES.ACCT.NO</fieldName>
<value>0110000020000005</value>
</field>
</message>
</Application>
</requestArguments>
</SessionRequest>
using the following code

Dim readx As XmlReader = XmlReader.Create("C:\Documents and Settings\gurubala\Desktop\1-1.t24txn.xml")
While readx.Read
If readx.NodeType = XmlNodeType.Element Then
MsgBox(readx.Name.ToString & " : " & readx.ReadString)
End If
End While


the problem here is it reads the nodes and values but starts to skip <message>---> <field>`s firstnode ... it leaves <fieldname> element and only reads <value> element
how to avoid this
thanks
with regards
Bala