PDA

View Full Version : Changing XML elements from code



murraymc
02-01-2005, 07:01 AM
I am sure I am missing something here but I can't seem to find any way to do this in the documentation.

I have a large XML settings file which will be installed or updated as part of the application install. I have imported sections of it into the XML File Changes View and now want to set certain elements from code e.g. the path to the (previously installed) data which will be a network share selected by the user at install runtime.

I seem only to be able to enter string literals or resource strings. How do I set the value of the element "App/Paths/Data" to "f:\myapp\data" at runtime

There is a comment about text substitution but I am not clear what it means as I don't see anyway to modify or properly view the XPath Query values shown (truncated) in the XPath Query Grid.

MTIA
Murray

Christopher Painter
02-01-2005, 08:28 AM
In another thread several of us Vets have decided that the XML view is not ready for prime time. I reccomend an InstallScript custom action to call MS XMLDOM to programatically do your replacements.

murraymc
02-01-2005, 08:37 AM
OK thanks for the info.

Thats going to cause a major fuss here. We upgraded specifically for that functionality to save me the development time of updating a large settings file. ;(

Murray