473,625 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Too l.NewToolRow()
nRow("out_tlnam e") = xmlReader.GetAt tribute("tlName ")
ScanResult1.Too l.AddToolRow(nR ow)

' add row to toolinstance table

nRow = ScanResult1.Too lInstance.NewRo w()
nRow("out_tliPa th") = xmlReader.GetAt tribute("tlExec ")
ScanResult1.Too lInstance.AddTo olInstanceRow(m Row)

End While

ScanResult1.Wri teXml("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="XXX XX" />
<Tool out_tlname="YYY YY" />
<Tool out_tlname="ZZZ ZZ" />
<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="ToolInsta nce">
<xs:complexType >
<xs:sequence>
</xs:sequence>
<xs:attribute name="out_tliPa th" type="xs:string "
/>
<xs:attribute name="out_tliSt atus"
type="xs:string " />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="out_tlnam e" type="xs:string " />
<xs:attribute name="out_tlSta tus" type="xs:string " />
</xs:complexType>
</xs:element>
Nov 12 '05 #1
0 1421

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

Similar topics

3
4412
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 source tables to update the target tables using a linked servers setup. Distributed Transaction Coordinator is running on both source and target servers. This following create command:
2
1533
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
14686
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 the database works out the key relationships and commits things to the log. Is there a way to speed up some of these deletes with out writing the information to the database logs? I am going to probably drop the RI on the tables and manually...
0
1443
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", dsSubs.Tables.Columns dsSubs.Tables.Columns) dsSubs.Tables.TableName = "NewsFeeds"
2
1587
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 String) Dim myconn As New SqlConnection("server=localhost;uid=ser;pwd=none;database=et") Dim mycom As New SqlCommand("select * from tbl1;select * from tbl2",
5
2961
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 document into a text document with a single row for each parent node (that has all of the values from all of the child nodes for that row) The DataView within VS 2005 IDE displays my 15 or so child tables - and knows that some parent rows...
3
4432
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 created to the dataset so that when I do use the "WriteXml" method, the generated xml file will be properly formatted to the schema I created. I did try using the "ReadXMLSchema" but it didn't work. Please help me!
0
1659
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 hierarchy as a whole showing a nested hierarchy of who reports to who such that when it is first loaded, all you will see is the top guy in the company with a plus next to his name. Opening that will reveal his first level reports and opening those will...
25
3512
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 receive. For the receive I store everything into tables except attachments - they are in a directory and only referenced in the tables. Everything works fine so no problem getting email to work. What I am wanting has to do with the interface. ...
0
8182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8688
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8352
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8494
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7178
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4085
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1496
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.