XML DataSource and where to store it

  • Thread starter Thread starter jehugaleahsa
  • Start date Start date
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
 
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?
 
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
 
Back
Top