我使用的是url-open()函数,但是我得到了一个空的响应。
发布于 2022-11-01 16:23:07
像这样的东西应该管用。如果您是从同一个设备运行代码,则不需要执行urlopen。
<!-- Load config file -->
<xsl:variable name="configFile" select="document('local:///myfolder/servers.xml')" />
<!-- Look in the XML file to find your server -->
<xsl:variable name="myURL">
<xsl:copy-of select="$configFile/config/Servers/Server[@name='prod']/url" />
</xsl:variable><?xml version="1.0" encoding="utf-8"?>
<config>
<Servers>
<Server name="prod">
<url>www.google.com</url>
</Server>
<Server name="dev">
<url>www.yahoo.com</url>
</Server>
</Servers>
</config>https://stackoverflow.com/questions/74272244
复制相似问题