0

I'm using url-open() function but I'm getting an empty response.

Itai Klapholtz
  • 196
  • 1
  • 2
  • 15

1 Answers1

0

Something like this should work. You don't need to do urlopen if you are running the code from the same appliance.

<!-- 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>
Matt
  • 11
  • 1