javax.xml.stream

Class XMLEventFactory

public abstract class XMLEventFactory extends Object

Factory for XML events.
Constructor Summary
protected XMLEventFactory()
Method Summary
abstract AttributecreateAttribute(String prefix, String namespaceURI, String localName, String value)
Create an attribute event.
abstract AttributecreateAttribute(String localName, String value)
Create an attribute event.
abstract AttributecreateAttribute(QName name, String value)
Create an attribute event.
abstract CharacterscreateCData(String content)
Create a text event of type CDATA section.
abstract CharacterscreateCharacters(String content)
Create a text event.
abstract CommentcreateComment(String text)
Create a comment event.
abstract DTDcreateDTD(String dtd)
Create a DOCTYPE declaration event.
abstract EndDocumentcreateEndDocument()
Create an end-document event.
abstract EndElementcreateEndElement(QName name, Iterator namespaces)
Create an end-element event.
abstract EndElementcreateEndElement(String prefix, String namespaceUri, String localName)
Create an end-element event.
abstract EndElementcreateEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
Create an end-element event.
abstract EntityReferencecreateEntityReference(String name, EntityDeclaration declaration)
Create an entity reference event.
abstract CharacterscreateIgnorableSpace(String content)
Create a text event of type ignorable whitespace.
abstract NamespacecreateNamespace(String namespaceURI)
Create a namespace declaration event.
abstract NamespacecreateNamespace(String prefix, String namespaceUri)
Create a namespace declaration event.
abstract ProcessingInstructioncreateProcessingInstruction(String target, String data)
Create a processing instruction event.
abstract CharacterscreateSpace(String content)
Create a text event of type whitespace.
abstract StartDocumentcreateStartDocument()
Create a start-document event.
abstract StartDocumentcreateStartDocument(String encoding, String version, boolean standalone)
Create a start-document event.
abstract StartDocumentcreateStartDocument(String encoding, String version)
Create a start-document event.
abstract StartDocumentcreateStartDocument(String encoding)
Create a start-document event.
abstract StartElementcreateStartElement(QName name, Iterator attributes, Iterator namespaces)
Create a start-element event.
abstract StartElementcreateStartElement(String prefix, String namespaceUri, String localName)
Create a start-element event.
abstract StartElementcreateStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
Create a start-element event.
abstract StartElementcreateStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
Create a start-element event.
static XMLEventFactorynewInstance()
Create a new factory instance.
abstract voidsetLocation(Location location)
Sets the location for each event created by this factory.

Constructor Detail

XMLEventFactory

protected XMLEventFactory()

Method Detail

createAttribute

public abstract Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)
Create an attribute event.

createAttribute

public abstract Attribute createAttribute(String localName, String value)
Create an attribute event.

createAttribute

public abstract Attribute createAttribute(QName name, String value)
Create an attribute event.

createCData

public abstract Characters createCData(String content)
Create a text event of type CDATA section.

createCharacters

public abstract Characters createCharacters(String content)
Create a text event.

createComment

public abstract Comment createComment(String text)
Create a comment event.

createDTD

public abstract DTD createDTD(String dtd)
Create a DOCTYPE declaration event.

createEndDocument

public abstract EndDocument createEndDocument()
Create an end-document event.

createEndElement

public abstract EndElement createEndElement(QName name, Iterator namespaces)
Create an end-element event.

createEndElement

public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName)
Create an end-element event.

createEndElement

public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
Create an end-element event.

createEntityReference

public abstract EntityReference createEntityReference(String name, EntityDeclaration declaration)
Create an entity reference event.

createIgnorableSpace

public abstract Characters createIgnorableSpace(String content)
Create a text event of type ignorable whitespace.

createNamespace

public abstract Namespace createNamespace(String namespaceURI)
Create a namespace declaration event.

createNamespace

public abstract Namespace createNamespace(String prefix, String namespaceUri)
Create a namespace declaration event.

createProcessingInstruction

public abstract ProcessingInstruction createProcessingInstruction(String target, String data)
Create a processing instruction event.

createSpace

public abstract Characters createSpace(String content)
Create a text event of type whitespace.

createStartDocument

public abstract StartDocument createStartDocument()
Create a start-document event.

createStartDocument

public abstract StartDocument createStartDocument(String encoding, String version, boolean standalone)
Create a start-document event.

createStartDocument

public abstract StartDocument createStartDocument(String encoding, String version)
Create a start-document event.

createStartDocument

public abstract StartDocument createStartDocument(String encoding)
Create a start-document event.

createStartElement

public abstract StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces)
Create a start-element event.

createStartElement

public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName)
Create a start-element event.

createStartElement

public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
Create a start-element event.

createStartElement

public abstract StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
Create a start-element event.

newInstance

public static XMLEventFactory newInstance()
Create a new factory instance.

See Also: newInstance

setLocation

public abstract void setLocation(Location location)
Sets the location for each event created by this factory.