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

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 82002

Latest Images

Trending Articles



Latest Images