[2008] HTML value between TAGS
I have a HTMLDocument, and in it there are a number of TAGS with a value between them:
Code:
<COLUMN><NAME>Subject</NAME></COLUMN>
<COLUMN><NAME>Status</NAME></COLUMN>
<COLUMN><NAME>Description</NAME></COLUMN>
I am struggling to get the values Subject, Status, Description from the HTML. This is what I am trying to do right now...
Code:
For Each htmlEl In htmlData.GetElementsByTagName("Name")
arrColumns(iCurCount).name = htmlEl.OuterHtml
Next
But this simply returns <NAME>.
OuterText, InnerText,InnerHTML all return Nothing, and children = 0.
I'm guessing Element level is the wrong place to be, but I don't see any other way around it.
Anybody have any experience in extracting this data?
Re: [2008] HTML value between TAGS
this works:
vb Code:
Dim htmlData As New Xml.XmlDocument
htmlData.LoadXml(html)
'change xpath in selectnodes
For Each node As XmlNode In htmlData.SelectNodes("File/COLUMN/NAME")
MsgBox(node.InnerText)
Next
Re: [2008] HTML value between TAGS
Thanks for that, back on the right track again :)
The full HTML is badly formed, and shifting it to a XML class failed miserably. But for this section in isolation, I can do what you suggested.
Thanks!