jquery - Parse XML with javascript from url -
Hello, I am making a start in JavaScript,
For a project, With XML file, I am using Zacry.
How can I open XML by my URL?
var xml = "Fichier.xml", xmlDoc = $ .parseXML (xml), $ xml = $ (xmlDoc),
There is an error on the line xmlDoc = $ .parseXML (xml),
: invalid XML: test.xml (error 0)
In your case, you expect a valid XML content as your argument. You have a URL that is not a valid XML, so you're getting the error.
What you can do, use it to load remote content and its success can be processed in your callback
var xml = "Fichier .xml "; $ .get (xml, function (doctor) works with {var $ xml = $ (doc); // $ xml}, 'xml');
Comments
Post a Comment