p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XML (http://p2p.wrox.com/forumdisplay.php?f=91)
-   -   problem in reading xml database (http://p2p.wrox.com/showthread.php?t=58489)

balaguru May 29th, 2007 02:41 AM

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


All times are GMT -4. The time now is 06:41 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.