03-02-2022, 05:23 AM
Can use HtmlDoc class
Function Function35
Function Function35
str html=
;<!DOCTYPE html>
;<html>
;;;;<head>
;;;;;;;;<title>Page Title</title>
;;;;</head>
;;;;<body>
;;;;;;;;<div class="title">
;;;;;;;;;;;;<a href="https://www.download/book.pdf" target="_blank">
;;;;;;;;;;;;;;;;Book title
;;;;;;;;;;;;</a>
;;;;;;;;;;;;<div class="js-subproduct-admin-edit" data-entity-kind="subproduct" data-machine-name="booktitle_1"></div>
;;;;;;;;</div>
;;;;;;;;</div class="some_other_block">
;;;;;;;;;;;;test
;;;;;;;;</div>
;;;;</body>
;</html>
HtmlDoc d.InitFromText(html)
ARRAY(MSHTML.IHTMLElement) div
int i
d.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