Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extract div block from HTML using xPath or QM string functions
#4
an example to use this without having browser open
this will extract the desired text from your 1st post here
Code:
Copy      Help
HtmlDoc doc doc2
doc.InitFromWeb("https://www.quickmacros.com/forum/showthread.php?tid=7213")
str s=doc.d3.getElementById("pid_35428").innerText
int i
out
doc2.InitFromText(s)
ARRAY(MSHTML.IHTMLElement) div div2
doc2.GetHtmlElements(div "div")
for i 0 div.len
,str cn=div[i].className
,if cn="title"
,,out "------------------InnerHtml------------------"
,,out div[i].innerHTML
,,out "------------------OuterHtml------------------"
,,out div[i].outerHTML
,,break


Messages In This Thread
RE: Extract div block from HTML using xPath or QM string functions - by Kevin - 03-02-2022, 06:07 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)