Would you like to be able use regular expressions to search for attribute names and vaules?
Would you like to be able to scope getElementById() to a subsection of the document's DOM tree?
Well now you can!


Test Span 1 (id=1)
Test Span 2 (id=12)
Test Span 3 (id=1)



domSearch().getElementsByTagNameAndAttribute('*', '^id$', '^1$').length  [Answer should be 2]



domSearch(document).getElementsByTagNameAndAttribute('*', '^id$', '^1').length  [Answer should be 3]



domSearch(document.getElementById('table1')).getElementsByTagNameAndAttribute('*', '^id$', '^1$').length  [Answer should be 1]



domSearch(document.getElementById('table1')).getElementsByTagNameAndAttribute('*', '^id$').length  [Answer should be 1]



domSearch(document.getElementById('table1')).getElementsByTagNameAndAttribute('span', '^id$').length  [Answer should be 1]



domSearch(document.getElementById('table1')).getElementById('1').childNodes[0].nodeValue)  [Answer should be 'Test Span 3 (id=1)']



XMLHttpRequest test (Won't work if accessing as file://)