473,385 Members | 2,210 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

writing XML using nested tables...

I am having difficulties maintaining table relationships when writing
XML files, despite having set the relations property NESTED to TRUE.
I assume therefore that something is wrong with my code. Can anyone
help?

CODE
====
While xmlReader.Read()

'add row to tool table

nRow = ScanResult1.Tool.NewToolRow()
nRow("out_tlname") = xmlReader.GetAttribute("tlName")
ScanResult1.Tool.AddToolRow(nRow)

' add row to toolinstance table

nRow = ScanResult1.ToolInstance.NewRow()
nRow("out_tliPath") = xmlReader.GetAttribute("tlExec")
ScanResult1.ToolInstance.AddToolInstanceRow(mRow)

End While

ScanResult1.WriteXml("c:\temp\test.xml")
Generated XML file: (ToolInstance should be nested...)
================================================== ====
<?xml version="1.0" standalone="yes"?>
<ScanResult xmlns="http://tempuri.org/ScanResult.xsd">
<Tool out_tlname="XXXXX" />
<Tool out_tlname="YYYYY" />
<Tool out_tlname="ZZZZZ" />
<ToolInstance out_tliPath="XX_A" />
<ToolInstance out_tliPath="YY_B" />
<ToolInstance out_tliPath="ZZ_C" />
</ScanResult>
XML Schema:
===========
<xs:element name="Tool" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType>
<xs:sequence>
<xs:element name="ToolInstance">
<xs:complexType>
<xs:sequence>
</xs:sequence>
<xs:attribute name="out_tliPath" type="xs:string"
/>
<xs:attribute name="out_tliStatus"
type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="out_tlname" type="xs:string" />
<xs:attribute name="out_tlStatus" type="xs:string" />
</xs:complexType>
</xs:element>
Nov 12 '05 #1
0 1407

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jonathan Bishop | last post by:
Hi. We are using MSDE2000 on a Point of Sale application. We need to keep a copy of a few key tables as up to date as possible for backup purposes. We are looking at using triggers over the...
2
by: kevin_Eld | last post by:
I have the following xml: <message> <envelope> <body key="" value="" /> </envelope> </message> I have associated an xsd to this xml in order to use the XmlDataDocument and give me the
3
by: vb | last post by:
I need to delete records from several large tables - 1 million plus rows. Some of these tables have nested foreign key relationships. When I perform the delete statements, it can take forever as...
0
by: George Durzi | last post by:
I have a DataSet with 3 tables, and two DataRelations dsSubs.Tables.TableName = "Subscriptions" dsSubs.Tables.TableName = "AccountManagers" dsSubs.Relations.Add "AccountManagers_Subscriptions",...
2
by: Roy | last post by:
Hey all, Here's a small VB codeblock that connects to a database and uses 2 SQL queries then forms a relation for a master/detail view on the aspx side: Private Sub Binddata(ByVal name As...
5
by: BMeyer | last post by:
I have been losing my mind trying to parse an XML document (with nested child elements, not all of which appear in each parent node) into a DataGrid object. What I want to do is "flatten" the XML...
3
by: Eric | last post by:
Help! I created a XML schema with a Visual Studio tools. I'm filling a dataset with a DataAdapter. Before I use the "WriteXml" method to write the data to a xml file, I want to map the XSD file I...
0
petepell
by: petepell | last post by:
Hello all, I am developing an application in VB 2008 that works with a SQL2005 DB to store and manipulate employee data. In one section of the app I want to be able to show a treeview of the...
25
mshmyob
by: mshmyob | last post by:
I am in testing mode for this part of my app so I can change anything to make this work. I have added email functionality to one of my apps. I use SMTP to send and either POP3 or IMAP4 to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.