So I have a code like that
var text = await execPromise('pdftohtml -i -xml -stdout /tmp/test-sync');
const parser = new DOMParser();
let xmlDoc = parser.parseFromString(text,"text/xml");
console.log(xmlDoc.getElementsByTagName(4))
now pdftohtml gives a nice xml with position of each line and the content of it but how do I access it within the dom parser?