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

dataset.readxml() problems

1
I am having some problems reading xml into a dataset and having it set up the datatables within it properly. i serialize an object into xml and read that xml into the dataset and the code i am working with relies on the datatables within it to all be constructed with the proper relations. however in certain cases this doesnt happen. here is a sample of the xml i'm working with:

Expand|Select|Wrap|Line Numbers
  1. <AuthResponse>
  2.   <info>
  3.     <infoDesc>test-infoDesc</infoDesc>
  4.     <infoCode>test-infoCode</infoCode>
  5.   </info>
  6.   <info>
  7.     <infoDesc>test-infoDesc</infoDesc>
  8.     <infoCode>test-infoCode</infoCode>
  9.   </info>
  10.   <userContext>
  11.     <userLang>test-userLang</userLang>
  12.     <userMenu>test-userMenu</userMenu>
  13.     <infoCode>test-infoCode</infoCode>
  14.     <DBName>test-DBName</DBName>
  15.     <timeStamp>2006-08-04T14:37:47.2165108-04:00</timeStamp>
  16.     <uniqueNum>25</uniqueNum>
  17.     <userName>test-userName</userName>
  18.   </userContext>
  19. </AuthResponse>
the authresponse object has an array of branchlist items and one usercontext item. what should be happening is that when it reads, it should create 3 data tables named AuthResponse, branchList, and UserContext and 2 relations should form linking the latter two to the former. however i only get the latter two tables in my dataset with no relation between them.

the strange thing is that if i remove the userContext object from the xml it works as expected, forming the relations with the proper remaining tables. if i remove the branch objects however i am only left with one datatable in my dataset named userContext. the dataset itself is named AuthResponse in all cases but ideally it should also contain the parent table also named AuthResponse with the relevant relations. I have tried reading the xml from a file as well as from a serialized object, and reading it from memorystreams or stringreaders or the like dont seem to change anything. Any ideas? :confused:
Aug 4 '06 #1
0 2008

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Stanley J Mroczek | last post by:
i got this far Sub getvin(ByVal sender As Object, ByVal e As System.EventArgs) Dim item As DataGridItem = CarGrid.Items(CarGrid.EditItemIndex) If (Not item Is Nothing) Then Dim txtVin As...
1
by: Jeffrey A. Voigt | last post by:
I'm having trouble loading some xml data into a dataset via the ReadXML call. I'm loading into the dataset an xml schema prior to the ReadXML call. I see that there IS in fact, 3 records that...
1
by: Matthew Baskey | last post by:
Hello, I need to reorder a Typed DataSet in memory using an Xsl Transform. Most of the examples use stream which write to the hard disk or xml file. I want to do this in memory and then write...
1
by: Tim Mulholland | last post by:
Hopefully someone can point out what is going on here. I'll give a short explanation first, then a more detailed one at the bottom if anyone wants to dig into it more. I have a strongly-typed...
11
by: Brian W. Smith | last post by:
I have XML Documents that I am digitally signing, and need to be able to load these documents into DataSet objects. However, after checking the signature and using the DataSet.ReadXML method, I am...
1
by: KJ | last post by:
I have an easy xml document, for example: <pics> <pic name="foo"/> <pic name="bar"/> </pics> I call ReadXML on my DataSet, and no problems (2 rows, one for each pic
2
by: Walt | last post by:
I have a small xml document that I bring into my application by reading the xml file with a dataset: Dim ds As New DataSet ds.ReadXml(fileName) ' Do some work with the tables in the dataset...
0
by: c.w.browne | last post by:
Hi, Ive had a bit of a look around for other people with this problem and cant find anything that solves it in my case, so I'm afraid im going to have to bother you all with a post of my own. ...
0
by: Arto Viitanen | last post by:
I am using WriteXML/ReadXml pair to save DataSet for later use. DataSet is built by reading textfiles and storing their data to different DataTables. Each file contains several complex values, that...
4
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got a DataSet that I save as XML using the DataSet DataTable's WriteXml method. If I say XmlWriteMode.IgnoreSchema, it shows up great in Excel, but I can not reopen the file in my...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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,...

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.