karwanpro Posted August 21, 2014 Share Posted August 21, 2014 hi i want get my currency convert from this XML file http://www.xe.com/datafeed/samples/sample-xml-usd.xml i try this code xmlDoc=loadXMLDoc("http://www.xe.com/datafeed/samples/sample-xml-usd.xml");x=xmlDoc.getElementsByTagName('cinverse')[10].childNodes[0].nodeValue;document.write(x); but don't work my currency is (Iraq Dinars) please help me Link to comment Share on other sites More sharing options...
justsomeguy Posted August 21, 2014 Share Posted August 21, 2014 Check your Javascript console for errors. If that loadXMLDoc function uses ajax, then you won't be able to load a file from a different domain. Link to comment Share on other sites More sharing options...
karwanpro Posted August 21, 2014 Author Share Posted August 21, 2014 please can you write me a code to get the currency from this XML file Link to comment Share on other sites More sharing options...
thescientist Posted August 21, 2014 Share Posted August 21, 2014 see his answer and provide the requested feedback Link to comment Share on other sites More sharing options...
L8V2L Posted August 22, 2014 Share Posted August 22, 2014 (edited) Use that path method that let you put in path expression as string. Edited August 22, 2014 by L8V2L Link to comment Share on other sites More sharing options...
thescientist Posted August 22, 2014 Share Posted August 22, 2014 Use that path method that let you put in path expression as string. huh? I'm not sure what that means, but I'm sure that is not the issue. I'm sure the issue is as JSG alluded to; same origin policy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now