Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
tidy などの外部ユーティリティを使用せずに、QWebkit の XPath および Qt クラス (およびおそらく他の標準または Qt クラス) を使用して HTML (XHTML ではなく HTML/HTML5) ページを解析することは可能ですか?
どうもありがとう!
いいえ、明らかに。XPath は整形式の XML 用ですが、HTML はそうではありません (具体的に除外した XHTML を除く)。
QtWebkit ページの DOM ツリーにアクセスするには、QtWebkit のQWebElementAPI を使用する必要があります。
QWebElement
でドキュメント要素にアクセスできます
QWebElement QWebView::page()->mainFrame()->documentElement();