How do you add an .xml file to a parser

//emailtest.xml

<?xml version="1.0 encoding="UTF-8" standalone="yes"> <0> John Doe doejohn@gmail.com <1> Jane Doe doejane@yahoo.com

emailtest.js

function Button1_Click(){
const parser = new DOMParser();
const xmlString = “Beware of the missing closing tag”;
const doc = parser.parseFromString(“/emailtest.xml”, “application/xml”);
const errorNode = doc.querySelector(‘parsererror’);
if (errorNode) {
// parsing failed
} else {
// parsing succeeded
}
Textbox1.Text = doc(1,1);
}

emailtest.html

emailtest

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.