Inno Setup根据自定义输入修改XML文件

[英]Inno Setup modify XML file based on custom input


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.

我对pascal不太熟悉,但我有一个脚本,目前检测是否安装了java,如果没有安装它。然后它将Jboss文件夹复制到用户选择的目录。

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.

我想允许用户输入一些数据库IP /架构信息,然后获取这些值并将其放在Jboss目录内的XML文件中的正确名称空间内。找到一些线程说你可以附加到它但我想我可能需要能够解析xml文件。

1 个解决方案

#1


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().

您可以使用MS XML DOM查找和编辑节点(请参阅附带的CodeAutomation.iss示例)或使用LoadStringFromFile()/ StringChange()/ SaveStringToFile()执行使用虚拟文件和标记的简单字符串替换。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2011/11/15/37d3aa9e1b2c6fbf6503150ed9b8118e.html



 
© 2014-2018 ITdaan.com 粤ICP备14056181号