473,789 Members | 2,746 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[.Net 2.0] XML -> DataSet - iteration issue

Hi all,

I have the following xml file...

<?xml version="1.0" encoding="utf-8" ?>

<Assembly>

<!--
' The name of the product/application/resource.
' Value is required
-->

<Product>UHBris tol Intranet Application Template</Product>

<!--
' A description of the product, what its used for, by who, non technical
' Value is required
-->

<Description>Te mplate for all future UHBristol Intranet
Applications.</Description>

<!--
' The first year of copyright, ie, the year the product was released
' Value is required
-->

<FirstYearOfCop yright>2008</FirstYearOfCopy right>

<!--
' Copyright text to be displayed on template
' Value is required
-->

<Copyright>UHBr istol [ University Hospitals Bristol NHS Foundation
Trust ]. All rights reserved.</Copyright>

<!--
' Version information for an assembly consists of the following four
values:
'
' Major Version
' Minor Version
'
' Example: 1.1
-->

<Version>1.0</Version>

<History>
<Release>
<Version>1.0</Version>
<Description>In itial Release</Description>
<Changes>
<Change></Change>
<Change></Change>
<Change></Change>
</Changes>
</Release>

<Release>
<Version>0.8</Version>
<Description>Pi lot Beta</Description>
<Changes>
<Change></Change>
</Changes>
</Release>

</History>

</Assembly>

I've just come across the dataset.ReadXml method and like the look of it as
a good way of grabbing the content of the xml file ready to iterate/parse.

I've had a look at the contents of the dataset after reading in the above
file....and I'm happy with most of it... apart from the 5th table that it
creates which is the "Change" table.... based on the above it will contain 4
rows... how do I determine which of those 4 rows (ie, each <change></change>
node above) belong to the appropriate <Releasenode?

I saw a ParentRelations .ParentTable - but if I have to put in a hell of a
load of checks to check which table we're working through then its not far
from the piles of code I'd already written (and will probably now be
binning) that was parsing the xml file node by node previously (without the
dataset)..

I was hoping to just For Each DataRow In DataTable.Rows kinda thing to get
the information I require...

Any information would be appreciated...

Kind regards

Rob Meade

Aug 18 '08 #1
0 811

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

Similar topics

3
1525
by: Vico | last post by:
Hi! I have a windows forms application and , what I basically do is: 1.- Instanciate a DataSet. 2.- Instanciate a XMlDataDocument attaching the DataSet to it. 3.- Load XmlDataDocument with a local XML document (C:\mydoc.xml) 2.- Bind it to a Datagrid. That is all!
2
6706
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The schema defines the following simpleType: <xs:simpleType name="cs"> <xs:restriction base="xs:token"> <xs:pattern value="*"/> </xs:restriction> </xs:simpleType>
6
5541
by: Christoph Duesmann | last post by:
Hi ! Here's my problem in english :-) I want to convert the mssecure.xml file from Microsoft into an dataset to store it in an SQL-Database. My code in VB looks like this : Dim ds As New DataSet Dim doc As New Xml.XmlDocument
0
1030
by: thomas | last post by:
I must be doing something obvious wrong here, but: I perform a query to retrieve a dataset - I want to archive this in a SQL field for seperate retrieval later, while the original data may have moved on - so I write it to a string of XML using ds.GetXML(). I then write that string to the DB, into 1 'text' type field. (I know the data will never get over a certain size) Later I read that field and retrieve the data as a string and...
4
1345
by: Mark | last post by:
Hi, does anyone know how I can simply get the dataset that is bound to a DataGrid? Something like... DataSet dsDataSet = DataGrid1.Tables........... Thanks Mark
4
1313
by: Shapper | last post by:
Hello, I have a XML file that includes the node <item>: .... <title>...</title> <url>...</url> <item> <title>title 01</title> <description>description 01</description> </item>
3
1927
by: Adam | last post by:
Hi All, What is the most acceptable way of iterating through a DataSet Tables Row Collections Manually? As in: 'fill data adapter object with dataset info Da = New SqlDataAdapter(Cmd) Da.Fill(Ds)
5
1434
by: David Harris | last post by:
I am developing a type of data warehouse. Basically, we have 20 client survey machines that are each separated from the server by space and lack of network. Yet both need to speak to each other such that the clients know the latest configuration information and the server contains completed survey data from the clients. Currently I'm accomplishing this by using a few special database tables to control the flow of information, and using XML...
0
1193
by: =?Utf-8?B?TXlMYWJSdWJ5?= | last post by:
I am developing an application that will be able to be used offline from the SQL server and am trying to come up with a good way to do this. My thought at this moment is to basically work "offline" all the time and sync on a regular basis when connected. To do this, I have written several procedures to load and save data from the database and an XML file. However, when I load the informatiom from the XML file and then try to save it to...
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10408
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...
0
9983
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...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3700
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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.