{"ScriptPreparationCode":"// language=HTML\r\nconst html = \u0060\r\n \u003C!-- article out start --\u003E\r\n \u003Carticle\u003E\r\n \u003C!-- article in start --\u003E\r\n \u003Ch1\u003ELorem ipsum\u003C/h1\u003E\r\n \u003Cp\u003ELorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque, nostrum.\u003C/p\u003E\r\n \u003C!-- article in end --\u003E\r\n \u003C/article\u003E\r\n \u003C!-- article out end --\u003E\r\n\r\n \u003C!-- article out start --\u003E\r\n \u003Carticle\u003E\r\n \u003C!-- article in start --\u003E\r\n \u003Ch1\u003ELorem ipsum\u003C/h1\u003E\r\n \u003Cp\u003ELorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque, nostrum.\u003C/p\u003E\r\n \u003C!-- article in end --\u003E\r\n \u003C/article\u003E\r\n \u003C!-- article out end --\u003E\r\n\r\n \u003C!-- article out start --\u003E\r\n \u003Carticle\u003E\r\n \u003C!-- article in start --\u003E\r\n \u003Ch1\u003ELorem ipsum\u003C/h1\u003E\r\n \u003Cp\u003ELorem ipsum dolor sit amet, consectetur adipisicing elit. Cumque, nostrum.\u003C/p\u003E\r\n \u003C!-- article in end --\u003E\r\n \u003C/article\u003E\r\n \u003C!-- article out end --\u003E\r\n\u0060;\r\nconst template = document.createElement(\u0027template\u0027);\r\ntemplate.innerHTML = html;\r\n\r\nwindow.testTemplate = template;","TestCases":[{"Name":"createTreeWalker","Code":" var html = document.querySelector(\u0027html\u0027);\r\n var walker = document.createTreeWalker(html, NodeFilter.SHOW_ALL);\r\n var node;\r\n while (node = walker.nextNode()) {\r\n console.log(node);\r\n }","IsDeferred":false},{"Name":"XPATH","Code":"var vv = \u0027count\u0027;\r\nvar data = {count:1};\r\nvar xpat = document.evaluate(\u0060//*[contains(translate(text(),\u0027 \u0027, \u0027\u0027), \u0022{{${vv}}}\u0022) or contains(translate(@value,\u0027 \u0027, \u0027\u0027), \u0022{{${vv}}}\u0022)]\u0060, document, null, XPathResult.ANY_TYPE, null);\r\nwhile(node = xpat.iterateNext()){\r\nconsole.log(node);\r\n}","IsDeferred":false}]}