473,408 Members | 1,754 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,408 software developers and data experts.

Readxml diffgram: returns empty dataset

Mav
Hello,

I'm trying to fill a dataset with the data of a diffgram xml-file.

I expect a dataset with datasetname "ComputerSystem" filled with 1
table (tables.count = 1). The only thing i've got is an empty dataset
(datasetname = "NewDataSet", tables.count=0). You find a code snippet
in attach. Any ideas?

Thanks,

Mav.

Dim XMLSource As String
Dim datasetHandler As DataSet
Dim srDataSet As StringReader

XMLSource = XMLSource & "<diffgr:diffgram
xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'
xmlns:diffgr='urn:schemas-microsoft-com:xml-diffgram-v1'>"
XMLSource = XMLSource & "<ComputerSystem>"
XMLSource = XMLSource & "<Win32_ComputerSystem
diffgr:id='Win32_ComputerSystem1' msdata:rowOrder='0'>"
XMLSource = XMLSource & "<GUID />"
XMLSource = XMLSource & "<CMEnvironment>AGENT</CMEnvironment>"
XMLSource = XMLSource & "<OEMLogoBitmap />"
XMLSource = XMLSource & "<OEMStringArray />"
XMLSource = XMLSource & "</Win32_ComputerSystem>"
XMLSource = XMLSource & "</ComputerSystem>"
XMLSource = XMLSource & "</diffgr:diffgram>"
Try
datasetHandler = New DataSet
srDataSet = New StringReader(XMLSource)
datasetHandler.ReadXml(srDataSet, XmlReadMode.DiffGram)
Catch gex As Exception
Debug.Write(gex.Message)
End Try
Nov 12 '05 #1
0 1814

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

Similar topics

11
by: DraguVaso | last post by:
Hi, I should use XML to synchronize the data from different (VB.NET) applications, and I was just wondering which Overloads of these functions ( ReadXmlSchema, ReadXml and WriteXml) goes the...
1
by: Lina | last post by:
Could anyone tell me what kind of standard (utf8 or utf16) the method Readxml in vb.net return? ds.ReadXml(filePath)
0
by: RM | last post by:
I have a simple XML file, the contents of which are below. I have validated this XML file with Microsofts online validator and it validates successfully. I .ReadXml() this data into a DataSet in...
1
by: John Lee | last post by:
Hi, When I use DataSet.WriteXml(filename, XmlWriteMode.DiffGram), the xml file contains current values (at <InvDataSet> node) and original value (at <diffgr:before> node) - this means the...
0
by: JJ | last post by:
Hi, I have a DataSet that has no records in it from Database. I use this for just collecting records that I have been working on. I have a new worker dataset that goes out to database and gets a...
1
by: Peter Hood | last post by:
Hi, I'm loading an XML Diffgram into a Dataset, then assigning asp webcontrols values from the dataset. I'm using XSL to display the page, but when one of the values is '&', I get an error. I...
5
by: Hans Munich | last post by:
Szenario: User selects a XML File ("products.xml") to import newest Data. Data should replace Data in an existing Acess File which is connected via Dataadapter (daadaptFLR). Bevore the Existing...
1
by: keikoo | last post by:
Hi, I,m trying to fill a DataSet with a xml file, so I pretend to use the ReadXml method. The .xsd file is defined, and the fields of the xml file have the same name and type than the DataTable...
1
by: webmaster | last post by:
I have a .net web service that when I call using http returns this auto format xml: <string> <coverage memkey="001" hplan="hmo" effdt="1999-10-01T00:00:00" termdt="1999-12-01T00:00:00" />...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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
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...
0
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,...
0
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...

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.