XML DataSource and where to store it

J

jehugaleahsa

Hello:

Is there a way to directly databind to an XML file? Right now I am
manually opening the file, finding my tags and adding the values to a
BindingSource.

While I'm on the topic, how and where should I store an XML file that
holds validation-type values? I need to allow my user to change this
file to add expense types. I feel like I am forced to store the XML
either in the application folder or in the bin directory during
development. I would prefer the XML file to follow the exe . . .
wherever it may go . . . automatically.

Thanks,
Travis
 
J

jehugaleahsa

Hello:

Is there a way to directly databind to an XML file? Right now I am
manually opening the file, finding my tags and adding the values to a
BindingSource.

While I'm on the topic, how and where should I store an XML file that
holds validation-type values? I need to allow my user to change this
file to add expense types. I feel like I am forced to store the XML
either in the application folder or in the bin directory during
development. I would prefer the XML file to follow the exe . . .
wherever it may go . . . automatically.

Thanks,
Travis

Well, I figured out the second part. Duh! Just set Copy to Output
Directory on the property screen. That's settles that. Now, what about
XML data sources?
 
M

Mr. Arnold

Hello:

Is there a way to directly databind to an XML file? Right now I am
manually opening the file, finding my tags and adding the values to a
BindingSource.

While I'm on the topic, how and where should I store an XML file that
holds validation-type values? I need to allow my user to change this
file to add expense types. I feel like I am forced to store the XML
either in the application folder or in the bin directory during
development. I would prefer the XML file to follow the exe . . .
wherever it may go . . . automatically.

Thanks,
Travis

Well, I figured out the second part. Duh! Just set Copy to Output
Directory on the property screen. That's settles that. Now, what about
XML data sources?


Do you mean read the XML into a Dataset and bind the Dataset to a Control?

http://support.microsoft.com/kb/311566
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top