C
cloftis
Using VS2003, VB and MSHTML,
Using an HTMLSpanElement I want to enumerate the attributes of a SPAN
tag.
1 'For testing sake
2 Dim strMarkup as String = "<span attr1='somevalue'
attr2='somevalue' attrN='...'>markup</span>"
3 Dim objSpan As HTMLSpanElement =
browser.Document.createElement("span")
4 objSpan.innerHTML = strMarkup
After the above code runs, I want to loop throught all the attributes
and inspect their names and values but I haven't found an easy way to
accomplish this... any suggestions?
I've tried using objSpan.attributes but it always has a large number
of elements in the array regardless of the number of elements I put in
strMarkup.
Your thoughts appreciated.
Using an HTMLSpanElement I want to enumerate the attributes of a SPAN
tag.
1 'For testing sake
2 Dim strMarkup as String = "<span attr1='somevalue'
attr2='somevalue' attrN='...'>markup</span>"
3 Dim objSpan As HTMLSpanElement =
browser.Document.createElement("span")
4 objSpan.innerHTML = strMarkup
After the above code runs, I want to loop throught all the attributes
and inspect their names and values but I haven't found an easy way to
accomplish this... any suggestions?
I've tried using objSpan.attributes but it always has a large number
of elements in the array regardless of the number of elements I put in
strMarkup.
Your thoughts appreciated.