cat
blank
blank
blank
blank
blank
bat
[name]cat[not]blank[not1]blank[not2]blank[not3]blank[not4]blank[type]bat[
cat
blank
bat
[name]cat[not]blank[type]bat[
cat
bat
[name]cat[type]bat[
cat
blank
bat
blank
{"ScriptPreparationCode":"var node = document.getElementById(\u0027node\u0027)\r\nvar attr = document.getElementById(\u0027attr\u0027)\r\nvar node2 = document.getElementById(\u0027node2\u0027)\r\n\r\nvar nodeS = document.getElementById(\u0027nodeS\u0027)\r\nvar attrS = document.getElementById(\u0027attrS\u0027)\r\nvar nodeS2 = document.getElementById(\u0027nodeS2\u0027)\r\n\r\nvar nodeS0 = document.getElementById(\u0027nodeS0\u0027)\r\nvar attrS0 = document.getElementById(\u0027attrS0\u0027)\r\nvar nodeS02 = document.getElementById(\u0027nodeS02\u0027)\r\n\r\nvar nodeB0 = document.getElementById(\u0027nodeB0\u0027)\r\n\r\nvar obj = { name:\u0027cat\u0027, not:\u0027blank\u0027, not1:\u0027blank\u0027, not2:\u0027blank\u0027, not3:\u0027blank\u0027, not4:\u0027blank\u0027, type:\u0027bat\u0027 }\r\n","TestCases":[{"Name":"read nodes with 7 child nodes","Code":"let elem = node.firstElementChild;\r\nlet n;\r\ndo {\r\n if ( elem.nodeName === \u0027TYPE\u0027 ) {\r\n \tn = elem.nodeValue;\r\n break;\r\n }\r\n} while (elem = elem.nextElementSibling)","IsDeferred":false},{"Name":"read attribute with 7 attributes","Code":"let n = attr.getAttribute(\u0027type\u0027);","IsDeferred":false},{"Name":"read nodevalue with 7 string attributes","Code":"let t = node2.firstElementChild.firstChild.nodeValue;\r\nlet s = t.indexOf(\u0027[type]\u0027)\r\nlet n = t.substring(s\u002B6, t.indexOf(\u0027[\u0027, s\u002B6) )","IsDeferred":false},{"Name":"read nodes with 3 child nodes","Code":"let elem = nodeS.firstElementChild;\r\nlet n;\r\ndo {\r\n if ( elem.nodeName === \u0027TYPE\u0027 ) {\r\n \tn = elem.nodeValue;\r\n break;\r\n }\r\n} while (elem = elem.nextElementSibling)","IsDeferred":false},{"Name":"read attribute with 3 attributes","Code":"let n = attrS.getAttribute(\u0027type\u0027);","IsDeferred":false},{"Name":"read nodevalue with 3 string attributes","Code":"let t = nodeS2.firstElementChild.firstChild.nodeValue;\r\nlet s = t.indexOf(\u0027[type]\u0027)\r\nlet n = t.substring(s\u002B6, t.indexOf(\u0027[\u0027, s\u002B6) )","IsDeferred":false},{"Name":"read nodes with 2 child nodes","Code":"let elem = nodeS0.firstElementChild;\r\nlet n;\r\ndo {\r\n if ( elem.nodeName === \u0027TYPE\u0027 ) {\r\n \tn = elem.nodeValue;\r\n break;\r\n }\r\n} while (elem = elem.nextElementSibling)","IsDeferred":false},{"Name":"read attribute with 2 attributes","Code":"let n = attrS0.getAttribute(\u0027type\u0027);","IsDeferred":false},{"Name":"read nodevalue with 2 string attributes","Code":"let t = nodeS02.firstElementChild.firstChild.nodeValue;\r\nlet s = t.indexOf(\u0027[type]\u0027)\r\nlet n = t.substring(s\u002B6, t.indexOf(\u0027[\u0027, s\u002B6) )","IsDeferred":false},{"Name":"obj with 7 entries","Code":"let n = obj[\u0027type\u0027]","IsDeferred":false},{"Name":"read nodes with 4 child nodes backwards","Code":"let elem = nodeB0.lastElementChild;\r\nlet n;\r\ndo {\r\n if ( elem.nodeName === \u0027TYPE\u0027 ) {\r\n \tn = elem.nodeValue;\r\n break;\r\n }\r\n} while (elem = elem.previousElementSibling)","IsDeferred":false},{"Name":"read nodes with 7 child nodes using children and go straight to position","Code":"let n = node.children[6].nodeValue","IsDeferred":false},{"Name":"read nodes with 7 child nodes and base on position","Code":"let elem = node.firstElementChild;\r\nlet n;\r\nfor (let i = 0; i\u003C10; i\u002B\u002B) {\r\n if ( i === 6 ) {\r\n \tn = elem.nodeValue;\r\n break;\r\n } \r\nelem = elem.nextElementSibling\r\n}","IsDeferred":false}]}