问题描述
我有以下XML文件.
<Configuration>
<Config1 connection="SQL">SampleData<Config1>
</Configuration>
我想在InstallScript函数中读取节点Config1的值"SampleData".我尝试了属性text,value,nodevalue.但是,没有一个有效.我可以读取属性连接的值.但是,如何读取节点的值"SampleData"?
I want to read the value "SampleData" of node Config1 in InstallScript function. I tried properties text, value, nodevalue. But none of it worked. I can read attribute connection's value. But how I can read node's value "SampleData"?
推荐答案
帮助文档 :也许请尝试以下帮助文件文档:
Help Documentation: Maybe try this help file documentation:
- 搜索XML数据
- 修改XML文件
帮助文件中还有其他几个地方讨论了XML问题,但这应该可以帮助您.
There are several other places in the help file that XML issues are discussed, but that should get you going.
Installscript :我想您可以在上面安装Installscript.我不推荐它.我没有适合您的示例,但掠夺github.com会给出以下内容.不知道它是否有效,但也许可以尝试一下.完全没有保证,风险自负.
Installscript: I suppose you could go Installscript on it. I would not recommend it. I don't have any samples for you, but pillaging github.com giveth the following. No idea if it works, but maybe give it a go. No guarantees at all - at your own risk.
一些其他链接 :
Some Further Links:
这篇关于如何在InstallScript中读取XML节点的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!