5

I'm not too familiar with pascal but I got a script going that currently detects whether java is installed, if not it installs it. Then it copies a Jboss folder to the directory that the user chooses.

I want to allow the user to enter some database IP/schema information then take those values and put it inside the correct namespaces in an XML file inside the Jboss directory. Found some threads saying that you can append to it but I think I might need to be able to parse the xml file.

Deanna
  • 23,876
  • 7
  • 71
  • 156
sng
  • 129
  • 1
  • 2
  • 12

1 Answers1

6

You can either use the MS XML DOM to find and edit the nodes (see the included CodeAutomation.iss for an example) or do a simple string replace with a dummy file and markers using LoadStringFromFile()/StringChange()/SaveStringToFile().

Deanna
  • 23,876
  • 7
  • 71
  • 156
  • The CodeAutomation.iss sample online has moved, but it's still included in Inno's installation folder: https://woofy.googlecode.com/hg/tools/Inno%20Setup/Examples/CodeAutomation.iss – Deanna Dec 01 '11 at 09:11
  • it shows how I can append a node to the end of the xml file but not how I can look for a node via if / compare statement by getting all the child nodes then modifying one of them. – sng Dec 01 '11 at 15:19
  • Deanna...i also need same functionaltiy as asked by synergy.....i have some 10 textboxes where i need to load the content from a xml and show to end user during installation.User can then overwrite this values in custom input boxes and when he/she goes to next step of installation then this new input should be written to XML file in respective tags.. – Sunil Sharma Jun 26 '12 at 07:32
  • I don't find much information on the properties and syntax of the MS XML DOM and its usage through Inno... the CodeAutomation bit is terribly incomplete for more advanced operations like iterating over a list of nodes. Cany anyone point me in the right direction? – Nyerguds May 08 '13 at 07:45
  • 1
    @Nyerguds It's the standard MSXML library as [documented in MSDN](http://msdn.microsoft.com/en-us/library/windows/desktop/ms763742(v=vs.85).aspx). Sample usage is in that file. You just need to change to the methods you want to actually use. I don't have a sample of enumeration to hand though. – Deanna May 10 '13 at 15:20