내가 작업하고있는 프로토 타입은 웹 사이트 내부에 심층적 인 IFrame을 추출해야합니다. 클래스를 포함하는 모든 요소를 찾아야하지만 HtmlAgilityPack의 PCL 배포에서는 XPath를 사용할 수 없으므로 this answer이 작동하지 않습니다. .Descendants()를 this answer으로 사용하는 다른 방법은 시도했기 때문에 Descendants()가 어린이의 자녀를 고려하지 않는 것으로 보입니다. 그렇지 않은 경우 어떻게해야 할 지 모르겠습니다. .HtmlAgilityPack, PCL, XPath없이 : 클래스별로 모든 요소를 얻는 방법?
site's 데이터 구조는 다음과 같다 :
html
body
div class mh-container
div class mh-wrapper
div class mh-main
div id main-content
article class post
div class entry-content <- has multiple (2) divs with os_poll
div class os_poll
div class os_widget_container <- TARGET
iframe name os_frame <- need data of the 'src' attribute
내 목표는 os_poll의 클래스와 모든 요소를 얻고, 그 다음은 iframe을 액세스하고 자신의 SRC 데이터를 얻을 수 있습니다. XPath는 작동하지 않고 노드를 탐색하여 어린이를 얻는 방법을 알지 못하기 때문에 (HAPS에 익숙하지 않습니다.)이 문제를 어떻게 처리해야할지 모르겠습니다.