public class HtmlParser
extends java.lang.Object
DocumentBuilder
. Depending on parsers available at runtime, input may need to be
well-formed XHTML.DocumentBuilder
,
instanceWithHtmlCleanupRules()
Constructor and Description |
---|
HtmlParser() |
Modifier and Type | Method and Description |
---|---|
static HtmlParser |
instance()
Creates a new parser instance.
|
static HtmlParser |
instanceWithHtmlCleanupRules()
Provides a parser instance with cleanup rules that make the result more suitable for generating wiki markup.
|
void |
parse(org.xml.sax.InputSource input,
DocumentBuilder builder)
Parses well-formed XHTML from the given input, and emit an approximation of the source document to the given
document builder.
|
void |
parse(org.xml.sax.InputSource input,
DocumentBuilder builder,
boolean asDocument)
Parses well-formed XHTML or HTML from the given input, and emit an approximation of the source document to the
given document builder.
|
public static HtmlParser instanceWithHtmlCleanupRules()
public static HtmlParser instance()
public void parse(org.xml.sax.InputSource input, DocumentBuilder builder) throws java.io.IOException, org.xml.sax.SAXException
parse(input,builder,true)
input
- the source inputbuilder
- the builder to which output is providedjava.io.IOException
org.xml.sax.SAXException
public void parse(org.xml.sax.InputSource input, DocumentBuilder builder, boolean asDocument) throws java.io.IOException, org.xml.sax.SAXException
input
- the source inputbuilder
- the builder to which output is providedasDocument
- indicates if the builder should be driven as a document
.java.io.IOException
org.xml.sax.SAXException
Copyright © 2007, 2013 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html