need help with XML and VB

ruchitakumar

New member
Joined
Feb 17, 2006
Messages
2
Programming Experience
1-3
hi every one i m trying to access a hierarchy of tables
i accessed the table from xml file and its imported in the set of 16 tables
the hierarchy can be seen in the following coda
<ENVELOPE>
- <HEADER>
<TALLYREQUEST>Import Data</TALLYREQUEST>

</HEADER>


- <BODY>
- <IMPORTDATA>
- <REQUESTDESC>
<REPORTNAME>All Masters</REPORTNAME>

- <STATICVARIABLES>
<SVCURRENTCOMPANY>SAHARA CONTAINER P.LTD</SVCURRENTCOMPANY>

</STATICVARIABLES>


</REQUESTDESC>


- <REQUESTDATA>
- <TALLYMESSAGE xmlns:UDF="TallyUDF">
- <VOUCHER REMOTEID="766a4181-162f-11da-bd9f-00409533948b-00000a6c" VCHTYPE="Payment" ACTION="Create">
<ISOPTIONAL>No</ISOPTIONAL>

<USEFORGAINLOSS>No</USEFORGAINLOSS>

<USEFORCOMPOUND>No</USEFORCOMPOUND>

<VOUCHERTYPENAME>Payment</VOUCHERTYPENAME>

<DATE>20040402</DATE>

<EFFECTIVEDATE>20040402</EFFECTIVEDATE>

<ISCANCELLED>No</ISCANCELLED>

<USETRACKINGNUMBER>No</USETRACKINGNUMBER>

<ISPOSTDATED>No</ISPOSTDATED>

<ISINVOICE>No</ISINVOICE>

<DIFFACTUALQTY>No</DIFFACTUALQTY>

<PARTYLEDGERNAME>THE MUMBAI C0-OP BANK LTD</PARTYLEDGERNAME>

<NARRATION>Ch. No. :256514 S.B.I. INCOME TAX A/C TOWARDS PAYMENT OF I.TAX FOR THE MONTH OF FEB. 04 AS PER DETAIL ATTACHED</NARRATION>

<ENTEREDBY>Jadav</ENTEREDBY>

<ASPAYSLIP>No</ASPAYSLIP>

<GUID>766a4181-162f-11da-bd9f-00409533948b-00000a6c</GUID>

<ALTERID>2963</ALTERID>

- <ALLLEDGERENTRIES.LIST>
<REMOVEZEROENTRIES>No</REMOVEZEROENTRIES>

<ISDEEMEDPOSITIVE>Yes</ISDEEMEDPOSITIVE>

<LEDGERFROMITEM>No</LEDGERFROMITEM>

<LEDGERNAME>T.D.S. ON SALARY</LEDGERNAME>

<AMOUNT>-21635.00</AMOUNT>

- <CATEGORYALLOCATIONS.LIST>
<CATEGORY>INCOME TAX</CATEGORY>

- <COSTCENTREALLOCATIONS.LIST>
<NAME>STAFF.</NAME>

<AMOUNT>-21635.00</AMOUNT>

</COSTCENTREALLOCATIONS.LIST>


</CATEGORYALLOCATIONS.LIST>


</ALLLEDGERENTRIES.LIST>


- <ALLLEDGERENTRIES.LIST>
<REMOVEZEROENTRIES>No</REMOVEZEROENTRIES>

<ISDEEMEDPOSITIVE>No</ISDEEMEDPOSITIVE>

<LEDGERFROMITEM>No</LEDGERFROMITEM>

<LEDGERNAME>THE MUMBAI C0-OP BANK LTD</LEDGERNAME>

<AMOUNT>21635.00</AMOUNT>

</ALLLEDGERENTRIES.LIST>


- <UDF:BANKERSDATE.LIST DESC="`BANKERSDATE`" ISLIST="YES">
<UDF:BANKERSDATE DESC="`BANKERSDATE`">20040407</UDF:BANKERSDATE>

</UDF:BANKERSDATE.LIST>


</VOUCHER>


</TALLYMESSAGE>
table number 8 is voucher n i m trying to access allledgerentries which is the child table
i m doin it using the given code
Dim dsAuthors As New DataSet("VOUCHER")
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
End Sub
Private Sub btnReadXML_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReadXML.Click
Dim filePath As String
filePath = "C:\Documents and Settings\Prasanna\My Documents\Visual Studio Projects\DAYBOOK.xml"
dsAuthors.ReadXml(filePath)
With DataGrid1
.DataSource = dsAuthors.Tables.Item(8).Rows(0).GetChildRows(dsAuthors.Tables.Item(8).ChildRelations.Item(0).ToString)
.DataMember = dsAuthors.Tables.Item(8).ChildRelations(0).ToString
.CaptionText = .DataMember
End With

End Sub
Private Sub btnShowSchema_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowSchema.Click
Dim swXML As New System.IO.StringWriter()
dsAuthors.WriteXmlSchema(swXML)
TextBox1.Text = swXML.ToString

End Sub
End
Class
here the data grid is supposed to print the child table allledgerentries for the first record of vouchers
i m getting the following error"cannot creat child list for ALLLEDGERENTRIES"
can someone please help
regards ruchita
 
Back
Top