org.util.xml.parse.policy
インタフェース ParserPolicy

既知の実装クラスの一覧:
DefaultParserPolicy, Div, HTMLImage, HTMLObject, HTMLParserPolicy, HTMLText, XMLParserPolicy

public interface ParserPolicy

作成者:
masaru

メソッドの概要
 Element allowElement(Element element)
          called when element is detected.
 boolean checkEndTag()
          if true, check open tag key and close tag key.
 boolean forceEmptyTag(java.lang.String key)
          Basicly, all the tag must open and close.
 ParserPolicy getInnerPolicy(Element element)
          return handler that handle this element
 java.lang.String selectEncoding(java.lang.String last_tag_key)
          if encoding cannot be detected by first line of document, this method will be called.
 boolean throwExceptionIfDocumentHasError()
          Throw exception if document has error.
 

メソッドの詳細

throwExceptionIfDocumentHasError

boolean throwExceptionIfDocumentHasError()
Throw exception if document has error. In case this method returns false, if there are errors, skip some texts and continue parsing.


checkEndTag

boolean checkEndTag()
if true, check open tag key and close tag key.


selectEncoding

java.lang.String selectEncoding(java.lang.String last_tag_key)
if encoding cannot be detected by first line of document, this method will be called. while returned null, this method will be called every time that tag detected.


forceEmptyTag

boolean forceEmptyTag(java.lang.String key)
Basicly, all the tag must open and close. But if this method return true, opentag will be considerd to empty tag. So end tag will disregarded.


getInnerPolicy

ParserPolicy getInnerPolicy(Element element)
return handler that handle this element


allowElement

Element allowElement(Element element)
called when element is detected.