2 * JinParser パッケージコメント
\r
4 * このファイルは、SunJDK5.0以降に含まれるJavadoc用に用意された、
\r
7 * パッケージコメントとパッケージ宣言のみが含まれます。
\r
9 * License : The MIT License
\r
10 * Copyright(c) 2009 olyutorskii
\r
14 * これは Jindolf プロジェクトにおける、
\r
15 * XHTML文書のパース部分を構成するパッケージです。
\r
17 * JinParserライブラリは、CGIゲーム「人狼BBS」のクライアント制作者向けに
\r
19 * JinParserライブラリは、人狼BBSの専用クライアント開発プロジェクト
\r
20 * 「Jindolf」から派生しました。
\r
25 * デコードエラー情報付き文字列{@code DecodedContent}を得るには、
\r
29 * InputStream is = .....
\r
30 * StreamDecoder decoder = new SjisDecoder();
\r
31 * ContentBuilder builder = new ContentBuilder();
\r
32 * decoder.setDecodeHandler(builder);
\r
34 * decoder.decode(is);
\r
35 * }catch(IOException e){
\r
37 * }catch(DecodeException e){
\r
40 * DecodedContent content = builder.getContent();
\r
44 * このようにして得られた文字列をパースして、
\r
45 * あなたの実装したハンドラ{@code YourHandler}に通知するには、
\r
49 * HtmlParser parser = new HtmlParser();
\r
50 * HtmlHandler handler = new YourHandler();
\r
51 * parser.setBasicHandler(handler);
\r
52 * parser.setTalkHandler(handler);
\r
53 * parser.setSysEventHandler(handler);
\r
55 * parser.parseAutomatic(content);
\r
56 * }catch(HtmlParseException e){
\r
62 * ハンドラ内部で、パース元となった文字列の一部を切り出したい場合は、
\r
63 * {@code EntityConverter}を使うのが便利です。
\r
71 * Copyright(c) 2009 olyutorskii
\r
74 * Permission is hereby granted, free of charge, to any person obtaining a
\r
75 * copy of this software and associated documentation files (the "Software"),
\r
76 * to deal in the Software without restriction, including without limitation
\r
77 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
\r
78 * and/or sell copies of the Software, and to permit persons to whom the
\r
79 * Software is furnished to do so, subject to the following conditions:
\r
82 * The above copyright notice and this permission notice shall be included in
\r
83 * all copies or substantial portions of the Software.
\r
86 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
87 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
88 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
89 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
90 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
\r
91 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
\r
92 * OTHER DEALINGS IN THE SOFTWARE.
\r
97 * @see <a href="http://jindolf.sourceforge.jp/">
\r
98 * Jindolfポータルサイト</a>
\r
99 * @see <a href="http://sourceforge.jp/projects/jindolf/">
\r
100 * Jindolf開発プロジェクト</a>
\r
103 package jp.sourceforge.jindolf.parser;
\r