| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
XMLEventFactory eventFactory = XMLEventFactory.newInstance();
Based on 35 examples
public abstract class XMLEventFactory extends Object
This interface defines a utility class for creating instances of XMLEvents
Constructor Summary | |
---|---|
protected |
|
Method Summary | |
---|---|
abstract Attribute |
createAttribute(QName name, String value) Create a new Attribute |
abstract Attribute |
createAttribute(String localName, String value) Create a new Attribute |
abstract Attribute |
createAttribute(String prefix, String namespaceURI, String localName, String value) Create a new Attribute |
abstract Characters |
createCData(String content) Create a Characters event with the CData flag set to true |
abstract Characters |
createCharacters(String content) Create a Characters event, this method does not check if the content is all whitespace. |
abstract Comment |
createComment(String text) Create a comment |
abstract DTD |
Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification |
abstract EndDocument |
Creates a new instance of an EndDocument event |
abstract EndElement |
createEndElement(QName name, Iterator namespaces) Create a new EndElement |
abstract EndElement |
createEndElement(String prefix, String namespaceUri, String localName) Create a new EndElement |
abstract EndElement |
createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces) Create a new EndElement |
abstract EntityReference |
createEntityReference(String name, EntityDeclaration declaration) Creates a new instance of a EntityReference event |
abstract Characters |
createIgnorableSpace(String content) Create an ignorable space |
abstract Namespace |
createNamespace(String namespaceURI) Create a new default Namespace |
abstract Namespace |
createNamespace(String prefix, String namespaceUri) Create a new Namespace |
abstract ProcessingInstruction |
createProcessingInstruction(String target, String data) Create a processing instruction |
abstract Characters |
createSpace(String content) Create a Characters event with the isSpace flag set to true |
abstract StartDocument |
Creates a new instance of a StartDocument event |
abstract StartDocument |
createStartDocument(String encoding) Creates a new instance of a StartDocument event |
abstract StartDocument |
createStartDocument(String encoding, String version) Creates a new instance of a StartDocument event |
abstract StartDocument |
createStartDocument(String encoding, String version, boolean standalone) Creates a new instance of a StartDocument event |
abstract StartElement |
createStartElement(QName name, Iterator attributes, Iterator namespaces) Create a new StartElement. |
abstract StartElement |
createStartElement(String prefix, String namespaceUri, String localName) Create a new StartElement. |
abstract StartElement |
Create a new StartElement. |
abstract StartElement |
createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context) Create a new StartElement. |
static XMLEventFactory |
Create a new instance of the factory |
static XMLEventFactory |
newInstance(String factoryId, ClassLoader classLoader) Create a new instance of the factory |
abstract void |
setLocation(Location location) This method allows setting of the Location on each event that is created by this factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XMLEventFactory()
Method Detail |
---|
public abstract Attribute createAttribute(QName name, String value)
name
- the qualified name of the attribute, may not be nullvalue
- the attribute value to set, may not be nullpublic abstract Attribute createAttribute(String localName, String value)
localName
- the local name of the XML name of the attribute, localName cannot be nullvalue
- the attribute value to set, may not be nullpublic abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)
prefix
- the prefix of this attribute, may not be nullnamespaceURI
- the attribute value is set to this value, may not be nulllocalName
- the local name of the XML name of the attribute, localName cannot be nullvalue
- the attribute value to set, may not be nullpublic abstract Characters createCData(String content)
content
- the string to createpublic abstract Characters createCharacters(String content)
content
- the string to createpublic abstract Comment createComment(String text)
text
- The text of the comment
a Comment eventpublic abstract DTD createDTD(String dtd)
dtd
- the text of the document type definitionpublic abstract EndDocument createEndDocument()
public abstract EndElement createEndElement(QName name, Iterator namespaces)
name
- the qualified name of the EndElementnamespaces
- an optional unordered set of objects that
implement Namespace that have gone out of scope, may be nullpublic abstract EndElement createEndElement(String prefix, String namespaceUri, String localName)
prefix
- the prefix of the QName of the new StartElementnamespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementpublic abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
prefix
- the prefix of the QName of the new StartElementnamespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementnamespaces
- an unordered set of objects that implement
Namespace that have gone out of scope, may be nullpublic abstract EntityReference createEntityReference(String name, EntityDeclaration declaration)
name
- The name of the referencedeclaration
- the declaration for the eventpublic abstract Characters createIgnorableSpace(String content)
content
- the space to createpublic abstract Namespace createNamespace(String namespaceURI)
namespaceURI
- the default namespace uripublic abstract Namespace createNamespace(String prefix, String namespaceUri)
prefix
- the prefix of this namespace, may not be nullnamespaceUri
- the attribute value is set to this value, may not be nullpublic abstract ProcessingInstruction createProcessingInstruction(String target, String data)
target
- The target of the processing instructiondata
- The text of the processing instructionpublic abstract Characters createSpace(String content)
content
- the content of the space to createpublic abstract StartDocument createStartDocument()
public abstract StartDocument createStartDocument(String encoding)
encoding
- the encoding stylepublic abstract StartDocument createStartDocument(String encoding, String version)
encoding
- the encoding styleversion
- the XML versionpublic abstract StartDocument createStartDocument(String encoding, String version, boolean standalone)
encoding
- the encoding styleversion
- the XML versionstandalone
- the status of standalone may be set to "true" or "false"public abstract StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces)
name
- the qualified name of the attribute, may not be nullattributes
- an optional unordered set of objects that
implement Attribute to add to the new StartElement, may be nullnamespaces
- an optional unordered set of objects that
implement Namespace to add to the new StartElement, may be nullpublic abstract StartElement createStartElement(String prefix, String namespaceUri, String localName)
prefix
- the prefix of the QName of the new StartElementnamespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementpublic abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
prefix
- the prefix of the QName of the new StartElementnamespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementattributes
- an unordered set of objects that implement
Attribute to add to the new StartElementnamespaces
- an unordered set of objects that implement
Namespace to add to the new StartElementpublic abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
prefix
- the prefix of the QName of the new StartElementnamespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementattributes
- an unordered set of objects that implement
Attribute to add to the new StartElement, may be nullnamespaces
- an unordered set of objects that implement
Namespace to add to the new StartElement, may be nullcontext
- the namespace context of this elementpublic static XMLEventFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationError
- if an instance of this factory cannot be loadedpublic static XMLEventFactory newInstance(String factoryId, ClassLoader classLoader) throws FactoryConfigurationError
factoryId
- Name of the factory to find, same as
a property nameclassLoader
- classLoader to useFactoryConfigurationError
- if an instance of this factory cannot be loadedpublic abstract void setLocation(Location location)
location
- the location to set on each event created
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |