|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
VB.NET 2005 & XMLheirachical nature of xml, when I read the file into a dataset, I get two tables. Is there a way I can flatten the tables, so I go from this: Table1: NAME Ryan Jake Table2: JOB DATE Paper March Homework April Other May To this: NAME JOB DATE Ryan Paper March Ryan Homework April Jake Other May Also, I want to make sure I can save it in the proper format (heirarchical). Thanks. Rzaleski,
Not with one statement. Have a look to this on our website http://www.vb-tips.com/default.aspx?ID=5fd5a8cf-54dc-4946-a193-8a9529b2b38b I hope this helps, Cor <rzale***@gmail.com> schreef in bericht Show quoteHide quote news:1141652405.888253.5510@z34g2000cwc.googlegroups.com... >I want to create an application that reads an xml diagram. Due to the > heirachical nature of xml, when I > read the file into a dataset, I get two tables. Is there a way I can > flatten the tables, so I go from this: > > Table1: > > NAME > Ryan > Jake > > Table2: > > JOB DATE > Paper March > Homework April > Other May > > To this: > > NAME JOB DATE > Ryan Paper March > Ryan Homework April > Jake Other May > > Also, I want to make sure I can save it in the proper format > (heirarchical). > > Thanks. > I understand how to do a relation in a datatable, but my problem is,
when the xml is read in, two tables are created. These two tables do not share a column. One table has name and the other has job and date. Ryan >I understand how to do a relation in a datatable, but my problem is, And the sample has that as well, One table has the names and one table has > when the xml is read in, two tables are created. These two tables do > not share a column. One table has name and the other has job and date. > the states. Cor You see, you are adding a column and creating the relation based on
that. If I am fed an XML file, I do not know the relations beforehand. Is there any other ways of doing this? When I call ds.ReadXML("myfile.mxl") it reads the data into 3 tables instead of one. rzaleski,
If you are absolute sure that the pairs are equal, than you can add to both a column and loop through both and add the index as key (Internaly of course). Than you can use the showed sample. I doubt that these two tables without key will work. Cor I am getting the following error:
Cannot add a nested relation or an element column to a table containing a SimpleContent column.
VSTO 2005 - Read Range from excel
Create application to extract data from excel sheet How can we mail some file without mentioning the SMTP server addre Treeview population directly from MSAccess How to create a Service to Log Application Names Macros too slow ! Re: "Visual Web Developer does not support creating Web sites on a Datagrid with comboboxes storing mysql data to a random access file debug problem |
|||||||||||||||||||||||