public abstract class StreamingParserFactory extends Object
StreamingParserFactory spf
= StreamingParserFactory.newInstance();
pf.setValidating(true);
pf.setCoalescing(false);
StreamingParser sp = spf.newParser(in);| Modifier | Constructor and Description |
|---|---|
protected |
StreamingParserFactory() |
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
isCoalescing()
Returns the coalescing property of this factory.
|
abstract boolean |
isNamespaceAware()
Returns the namespaceAware property of this factory.
|
abstract boolean |
isValidating()
Returns the validating property of this factory.
|
static StreamingParserFactory |
newInstance()
Creates a new factory of demand-driven parsers.
|
abstract StreamingParser |
newParser(File file)
Creates a new demand-driven parser that reads from the given file.
|
abstract StreamingParser |
newParser(InputStream in)
Creates a new parser instance that reads from the given input stream.
|
abstract void |
setCoalescing(boolean coalescing)
Sets the coalescing property of this factory.
|
abstract void |
setNamespaceAware(boolean namespaceAware)
Sets the namespaceAware property of this factory.
|
abstract void |
setValidating(boolean validating)
Sets the validating property of this factory.
|
public static StreamingParserFactory newInstance()
public abstract void setValidating(boolean validating)
validating - Parsers henceforth created by this factory will perform
validation if, and only if, this parameter is trueUnsupportedOperationException - If the parser implementation does not support the requested
valuepublic abstract boolean isValidating()
public abstract void setCoalescing(boolean coalescing)
StreamingParser.CHARS state will never occur
more than once in sequence.coalescing - Parsers henceforth created by this factory will coalesce
character data if, and only if, this parameter is trueUnsupportedOperationException - If the parser implementation does not support the requested
valuepublic abstract boolean isCoalescing()
public abstract void setNamespaceAware(boolean namespaceAware)
namespaceAware - Parsers henceforth created by this factory will support
namespace if, and only if, this parameter is trueUnsupportedOperationException - If the parser implementation does not support the requested
valuepublic abstract boolean isNamespaceAware()
public abstract StreamingParser newParser(InputStream in)
parse method of the resulting parser must be invoked to parse the
initial component of the input document.in - The input stream from which the XML document will be readpublic abstract StreamingParser newParser(File file) throws IOException
parse method must be invoked to parse the initial component of the
given document.file - The file from which the XML document will be readIOException - If an I/O error occursCopyright © 2017–2019 Eclipse Foundation. All rights reserved.