<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          OCGumboHTML5解析引擎

          聯(lián)合創(chuàng)作 · 2023-09-21 23:36

          OCGumbo是一個Objective-C寫的HTML5解析引擎,基于Google gumbo開源項目。

          OCGumbo除了基礎(chǔ)的解析功能外,最大的特色是對增加了類似JQuery的查詢功能。

          示例代碼:

          OCGumboDocument *document = [[OCGumboDocument alloc] initWithHTMLString:htmlString];
          OCGumboElement *root = document.rootElement;
          //document: do something with the document.
          //rootElement: do something with the html tree.
          
          NSLog(@"options: %@", document.Query(@"body").find(@"#select").find(@"option"));
          NSLog(@"title: %@", document.Query(@"title").text());
          NSLog(@"attribute: %@", document.Query(@"select").first().attr(@"id"));
          NSLog(@"class: %@", document.Query(@"#select").parents(@".main"));
          NSLog(@"tag.class: %@", document.Query(@"div.theCls"));
          NSLog(@"tag#id : %@", document.Query(@"div#theId"));
          
          瀏覽 19
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  久久精品福利免费视频 | 欧美极品少妇 | 中文无码人妻 | 天天弄天天日 | 日本高清视频一区二区三区 |