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='somevalu e'
attr2='somevalu e' attrN='...'>mar kup</span>"
3 Dim objSpan As HTMLSpanElement =
browser.Documen t.createElement ("span")
4 objSpan.innerHT ML = 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.attribu tes 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='somevalu e'
attr2='somevalu e' attrN='...'>mar kup</span>"
3 Dim objSpan As HTMLSpanElement =
browser.Documen t.createElement ("span")
4 objSpan.innerHT ML = 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.attribu tes 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.
Comment