org.apache.shindig.gadgets.parse.nekohtml
Class NekoSimplifiedHtmlParser
java.lang.Object
org.apache.shindig.gadgets.parse.GadgetHtmlParser
org.apache.shindig.gadgets.parse.nekohtml.NekoSimplifiedHtmlParser
public class NekoSimplifiedHtmlParser
- extends GadgetHtmlParser
Supports parsing of social markup blocks inside gadget content.
<script> elements with types of either "text/os-template"
or "text/os-data" are parsed inline into contained DOM hierarchies
for subsequent processing by the pipeline and template rewriters.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NekoSimplifiedHtmlParser
@Inject
public NekoSimplifiedHtmlParser(DOMImplementation documentFactory)
parseDomImpl
protected Document parseDomImpl(String source)
throws GadgetException
- Description copied from class:
GadgetHtmlParser
- TODO: remove the need for parseDomImpl as a parsing method. Gadget HTML is
tag soup handled in custom fashion, or is a legitimate fragment. In either case,
we can simply use the fragment parsing implementation and patch up in higher-level calls.
- Specified by:
parseDomImpl in class GadgetHtmlParser
- Parameters:
source - a piece of HTML
- Returns:
- a Document parsed from the HTML
- Throws:
GadgetException
parseFragmentImpl
protected DocumentFragment parseFragmentImpl(String source)
throws GadgetException
- Specified by:
parseFragmentImpl in class GadgetHtmlParser
- Parameters:
source - a snippet of HTML markup
- Returns:
- a DocumentFragment containing the parsed elements
- Throws:
GadgetException
newConfiguration
protected org.cyberneko.html.HTMLConfiguration newConfiguration()
newDocumentHandler
protected NekoSimplifiedHtmlParser.DocumentHandler newDocumentHandler(String source)
Copyright © 2007-2012. All Rights Reserved.