亚当的`dom`解析器

import arsd.dom;
import std.stdio;

void main() {
    auto document = new Document("your html string here");
    foreach(option; document.querySelectorAll("option"))
         writeln(option.value); // or option.innerText
}

dmd yourfile.d dom.d编译,非utf8加上characterencodings.d文件.
参考在此

posted @ 2021-10-05 22:21  zjh6  阅读(13)  评论(0)    收藏  举报  来源