Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

How to read Xml Config file in javascript

$
0
0

Hi,

I have a XML config file like

<?xml version="1.0"?>
<configuration>
<appSettings>

<!-- Key for Partner Source URL-->
<add key="Partner site URL " value="http://www.google.com" encrypted="false"/>

</appSettings>
</configuration>

Now i need this key value in my java script function. I have tried this 

function RetrieveUrl()
{
debugger;
var xmlPath = "../WebResources/zon_/Data/config.xml";
var nodePath = "//configuration";
var doc = new ActiveXObject("Microsoft.XMLDOM");
doc.preserveWhiteSpace = true;
doc.async = false;
doc.load(xmlPath);

var s=doc.getElementsByTagName("Partner_site_URL");

}

I have got the xml in Load method but i am not able to fetch the Key value.

Thanks

Abhishek


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>