|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavax.xml.parsers.DocumentBuilder
org.jdesktop.dom.SimpleDocumentBuilder
public class SimpleDocumentBuilder extends DocumentBuilder
A DOM DocumentBuilder implementation that does
not require the factory pattern for creation. Most of the time calling one of
the static simpleParse methods is all that is required. Occasionally
you may need to create an instance of SimpleDocumentBuilder to tweak some of the
builder settings (such as setting an ErrorHandler or EntityResolver).
| Field Summary | |
|---|---|
private static ThreadLocal |
NS_PARSER
|
private static ThreadLocal |
PARSER
|
private DocumentBuilder |
builder
|
| Constructor Summary | |
SimpleDocumentBuilder()
Create a new SimpleDocumentBuilder. |
|
SimpleDocumentBuilder(boolean namespaceAware)
|
|
SimpleDocumentBuilder(DocumentBuilderFactory factory)
Create a SimpleDocumentBuilder that will wrap builders created from the given factory. |
|
| Method Summary | |
|---|---|
org.w3c.dom.DOMImplementation
|
getDOMImplementation()
@inheritDoc |
Schema
|
getSchema()
@inheritDoc |
boolean
|
isNamespaceAware()
@inheritDoc |
boolean
|
isValidating()
@inheritDoc |
boolean
|
isXIncludeAware()
@inheritDoc |
SimpleDocument
|
newDocument()
@inheritDoc |
org.w3c.dom.Document
|
newPlainDocument()
|
SimpleDocument
|
parse(InputSource is)
@inheritDoc |
SimpleDocument
|
parse(InputStream is)
@inheritDoc |
SimpleDocument
|
parse(InputStream is, String systemId)
@inheritDoc |
SimpleDocument
|
parse(String uri)
@inheritDoc |
SimpleDocument
|
parse(File f)
@inheritDoc |
SimpleDocument
|
parseString(String xml)
Parse the content of the given String as an XML document and return a new DOM SimpleDocument object. |
void
|
reset()
@inheritDoc |
void
|
setEntityResolver(EntityResolver er)
@inheritDoc |
void
|
setErrorHandler(ErrorHandler eh)
@inheritDoc |
static SimpleDocument
|
simpleParse(InputSource is)
Parse the content of the given input source as an XML document and return a new DOM SimpleDocument object. |
static SimpleDocument
|
simpleParse(InputStream in)
Parse the content of the given |
static SimpleDocument
|
simpleParse(URL url)
Parse the content of the given URL as an XML document and return a new DOM SimpleDocument object. |
static SimpleDocument
|
simpleParse(String xml)
Parse the content of the given String as an XML document and return a new DOM SimpleDocument object. |
static SimpleDocument
|
simpleParse(InputSource is, boolean namespaceAware)
Parse the content of the given input source as an XML document and return a new DOM SimpleDocument object. |
static SimpleDocument
|
simpleParse(InputStream in, boolean namespaceAware)
Parse the content of the given |
static SimpleDocument
|
simpleParse(URL url, boolean namespaceAware)
Parse the content of the given URL as an XML document and return a new DOM SimpleDocument object. |
static SimpleDocument
|
simpleParse(String xml, boolean namespaceAware)
Parse the content of the given String as an XML document and return a new DOM SimpleDocument object. |
| Methods inherited from class DocumentBuilder | |
|---|---|
| reset, parse, parse, parse, parse, parse, setErrorHandler, setEntityResolver, isNamespaceAware, isValidating, newDocument, getDOMImplementation, getSchema, isXIncludeAware, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Methods inherited from class Object | |
|---|---|
| wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
| Field Detail |
|---|
private static ThreadLocal NS_PARSER
private static ThreadLocal PARSER
private DocumentBuilder builder
| Constructor Detail |
|---|
public SimpleDocumentBuilder()
public SimpleDocumentBuilder(boolean namespaceAware)
public SimpleDocumentBuilder(DocumentBuilderFactory factory)
| Method Detail |
|---|
public org.w3c.dom.DOMImplementation getDOMImplementation()
public Schema getSchema()
public boolean isNamespaceAware()
public boolean isValidating()
public boolean isXIncludeAware()
public SimpleDocument newDocument()
org.w3c.dom.Document newPlainDocument()
public SimpleDocument parse(InputSource is)
public SimpleDocument parse(InputStream is)
public SimpleDocument parse(InputStream is, String systemId)
public SimpleDocument parse(String uri)
public SimpleDocument parse(File f)
public SimpleDocument parseString(String xml)
IllegalArgumentException is thrown if the
String is null.xml is nullxml - String containing the content to be parsed.SimpleDocument result of parsing the
String
public void reset()
public void setEntityResolver(EntityResolver er)
public void setErrorHandler(ErrorHandler eh)
public static SimpleDocument simpleParse(InputSource is)
IllegalArgumentException is thrown if the
InputSource is null null.is is nullis - InputSource containing the content to be parsed.
public static SimpleDocument simpleParse(InputStream in)
InputStream as an XML
document and return a new DOM SimpleDocument object.
An IllegalArgumentException is thrown if the
InputStream is null.is is nullis - InputStream containing the content to be parsed.SimpleDocument result of parsing the
InputStream
public static SimpleDocument simpleParse(URL url)
IllegalArgumentException is thrown if the
URI is null null.url is nulluri - The location of the content to be parsed.
public static SimpleDocument simpleParse(String xml)
IllegalArgumentException is thrown if the
String is null.xml is nullxml - String containing the content to be parsed.SimpleDocument result of parsing the
String
public static SimpleDocument simpleParse(InputSource is, boolean namespaceAware)
IllegalArgumentException is thrown if the
InputSource is null null.is is nullis - InputSource containing the content to be parsed.namespaceAware - whether the parser should be namespace aware
public static SimpleDocument simpleParse(InputStream in, boolean namespaceAware)
InputStream as an XML
document and return a new DOM SimpleDocument object.
An IllegalArgumentException is thrown if the
InputStream is null.is is nullin - InputStream containing the content to be parsed.namespaceAware - whether the parser should be namespace awareSimpleDocument result of parsing the
InputStream
public static SimpleDocument simpleParse(URL url, boolean namespaceAware)
IllegalArgumentException is thrown if the
URI is null null.url is nullurl - The location of the content to be parsed.namespaceAware - whether the parser should be namespace aware
public static SimpleDocument simpleParse(String xml, boolean namespaceAware)
IllegalArgumentException is thrown if the
String is null.xml is nullxml - String containing the content to be parsed.namespaceAware - whether the parser should be namespace awareSimpleDocument result of parsing the
String
Groovy Documentation