Link to home
Start Free TrialLog in
Avatar of VeeVan
VeeVan

asked on

Questions about creating XML file

I am running a .net app that needs to email a record to another location. I would like that record to be in XML format. It needs to contain multiple tables from a local MSDE database. There may be one or multiple rows from each table that need to be a part of an export.

On the opposite end, I need to import into a SQL server DB. I am good with that part. I can use the readxml to get it into a temptable in my SP and then use the data from there.. What I am not sure about is how to structure my XML file on the "sending" end so that I can read it on the "receiving" end.

Also, I don't know if there is a "simple" way to do this, or if I am goign to need to manually loop through each dataset and manuall write the XML tags and data.

Thanks for advice/guidance.
Vee
Avatar of ullfindsmit
ullfindsmit
Flag of United States of America image

there is a dataset.writexml function which will write to a file path given as parameter

also you can do dataset.getxml which returns a string
Avatar of VeeVan
VeeVan

ASKER

Right, but the way the program is coded right now, each dataset only holds one table from my database. How to I get multiple tables into the same XML file?
ASKER CERTIFIED SOLUTION
Avatar of ullfindsmit
ullfindsmit
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VeeVan

ASKER

Right. I was hoping to avoid recreating my DS, but oh, well. It's easier than manually writing each line to the XML file. Thanks for your help.
Vee
glad to help