Introduction HtmlCleaner is an open source HTML parser written in Java. HTML found on the Web is usually dirty, ill-formed and unsuitable for further processing. For any serious consumption of such documents, it is necessary to first clean up the mess and bring some order to the tags, attributes and ordinary text. For any given HTML document, HtmlCleaner reorders individual elements and produces w
先日取り上げたexblogのひどいHTMLを、HTML向けSAXパーサに読ませるとどうなるかの実験。startElement()やendElement()がどうコールされるかによって、パーサごとの性格が現れる。 コールバックメソッド level はネストの深さを表すインスタンス変数。 public void startElement(String uri, String localName, String qName, Attributes attrs){ for(int i = 0; i < level; i++) System.out.print(" "); System.out.print("<"+localName); for(int i = 0; i < attrs.getLength(); i++) System.out.print(" "+attrs.getQName(i)+
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く