Click here to Skip to main content
15,922,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have learnt how to create a xml files and populate datasets from it. I have also learnt how to create an xsd with several related xml tables in it. I can populate a dataset from an xml file, which is much like a single table in a database.
I am however now at a loss on how the xsd and the xml files are suppose to work together: Is there a place in vb 2005 where you can specify the xml dataset (xsd) as the application datasource, ie the way access/sql is set as datasource and creates my.settings connection string in the app.config file?
2. is there a way the xsd can own the xml files in the application, the way an access/sql datasource 'is parent' to its tables/tableadapters?
I appreciate your always candid responses!
Posted

1 solution

No. Your first mistake is thinking that XML is a database at all. It's not and was never designed to be. The adapters you speak of write SQL queries that the backend database engines process to manipulate the records in question. XML has no such facility.
 
Share this answer
 
Comments
cyberexel 7-Dec-10 7:09am    
Ooh! Thanks, Dave.
So for every form/connection I wish to make I have to write the necessary SQL statements, right? I wanted to be sure before I do this for every form, grid, etc and then find out later that there was an easier, efficient way.
One last question, what is the use of xsd when i will have to manipulate all my data directly from the xml files? Can you please show me a statement or a link how xsd can be used? I thought if it is part of the application then there must be an advantage it give.

Edits: I have found the use of xsd: it is used to validate the xml files as shown here: Simple code to validate an XML file against a schema file (XSD)[^] and here http://support.microsoft.com/kb/315533[^]

Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900