Top Description Fields Constructors Methods
org.apache.xerces.stax

public final Class XMLEventFactoryImpl

extends XMLEventFactory
Class Inheritance
Imports
java.util.Iterator, javax.xml.XMLConstants, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.Location, .XMLEventFactory, .XMLStreamConstants, javax.xml.stream.events.Attribute, .Characters, .Comment, .DTD, .EndDocument, .EndElement, .EntityDeclaration, .EntityReference, .Namespace, .ProcessingInstruction, .StartDocument, .StartElement, org.apache.xerces.stax.events.AttributeImpl, .CharactersImpl, .CommentImpl, .DTDImpl, .EndDocumentImpl, .EndElementImpl, .EntityReferenceImpl, .NamespaceImpl, .ProcessingInstructionImpl, .StartDocumentImpl, .StartElementImpl

Implementation of XMLEventFactory.

Version
$Id: XMLEventFactoryImpl.java 730796 2009-01-02 17:36:23Z mrglavas $

Field Summary

Modifier and TypeField and Description
private Location

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Attribute
createAttribute(String
the prefix of this attribute, may not be null
prefix
,
String
the attribute value is set to this value, may not be null
namespaceURI
,
String
the local name of the XML name of the attribute, localName cannot be null
localName
,
String
the attribute value to set, may not be null
value
)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute
public Attribute
createAttribute(String
the local name of the XML name of the attribute, localName cannot be null
localName
,
String
the attribute value to set, may not be null
value
)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute
public Attribute
createAttribute(QName
the qualified name of the attribute, may not be null
name
,
String
the attribute value to set, may not be null
value
)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute
public Characters
createCData(String
the string to create
content
)

Implements abstract javax.xml.stream.XMLEventFactory.createCData.

Create a Characters event with the CData flag set to true
public Characters
createCharacters(String
the string to create
content
)

Implements abstract javax.xml.stream.XMLEventFactory.createCharacters.

Create a Characters event, this method does not check if the content is all whitespace.
public Comment
createComment(String
The text of the comment
text
)

Implements abstract javax.xml.stream.XMLEventFactory.createComment.

Create a comment.
public DTD
createDTD(String
the text of the document type definition
dtd
)

Implements abstract javax.xml.stream.XMLEventFactory.createDTD.

Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification
public EndDocument
createEndDocument()

Implements abstract javax.xml.stream.XMLEventFactory.createEndDocument.

Creates a new instance of an EndDocument event
public EndElement
createEndElement(QName
the qualified name of the EndElement
name
,
Iterator<E>
an optional unordered set of objects that implement Namespace that have gone out of scope, may be null
namespaces
)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement
public EndElement
createEndElement(String
the prefix of the QName of the new StartElement
prefix
,
String
the uri of the QName of the new StartElement
namespaceUri
,
String
the local name of the QName of the new StartElement
localName
)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement
public EndElement
createEndElement(String
the prefix of the QName of the new StartElement
prefix
,
String
the uri of the QName of the new StartElement
namespaceUri
,
String
the local name of the QName of the new StartElement
localName
,
Iterator<E>
an unordered set of objects that implement Namespace that have gone out of scope, may be null
namespaces
)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement
public EntityReference
createEntityReference(String
The name of the reference
name
,
EntityDeclaration
the declaration for the event
declaration
)

Implements abstract javax.xml.stream.XMLEventFactory.createEntityReference.

Creates a new instance of a EntityReference event
public Characters
createIgnorableSpace(String
the space to create
content
)

Implements abstract javax.xml.stream.XMLEventFactory.createIgnorableSpace.

Create an ignorable space
public Namespace
createNamespace(String
the default namespace uri
namespaceURI
)

Implements abstract javax.xml.stream.XMLEventFactory.createNamespace.

Create a new default Namespace
public Namespace
createNamespace(String
the prefix of this namespace, may not be null
prefix
,
String
the attribute value is set to this value, may not be null
namespaceUri
)

Implements abstract javax.xml.stream.XMLEventFactory.createNamespace.

Create a new Namespace
public ProcessingInstruction
createProcessingInstruction(String
The target of the processing instruction
target
,
String
The text of the processing instruction
data
)

Implements abstract javax.xml.stream.XMLEventFactory.createProcessingInstruction.

Create a processing instruction
public Characters
createSpace(String
the content of the space to create
content
)

Implements abstract javax.xml.stream.XMLEventFactory.createSpace.

Create a Characters event with the isSpace flag set to true
public StartDocument
createStartDocument()

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event
public StartDocument
createStartDocument(String
the encoding style
encoding
,
String
the XML version
version
,
boolean
the status of standalone may be set to "true" or "false"
standalone
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event
public StartDocument
createStartDocument(String
the encoding style
encoding
,
String
the XML version
version
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event
public StartDocument
createStartDocument(String
the encoding style
encoding
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event
public StartElement
createStartElement(QName
the qualified name of the attribute, may not be null
name
,
Iterator<E>
an optional unordered set of objects that implement Attribute to add to the new StartElement, may be null
attributes
,
Iterator<E>
an optional unordered set of objects that implement Namespace to add to the new StartElement, may be null
namespaces
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement.
public StartElement
createStartElement(String
the prefix of the QName of the new StartElement
prefix
,
String
the uri of the QName of the new StartElement
namespaceUri
,
String
the local name of the QName of the new StartElement
localName
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement.
public StartElement
createStartElement(String
the prefix of the QName of the new StartElement
prefix
,
String
the uri of the QName of the new StartElement
namespaceUri
,
String
the local name of the QName of the new StartElement
localName
,
Iterator<E>
an unordered set of objects that implement Attribute to add to the new StartElement
attributes
,
Iterator<E>
an unordered set of objects that implement Namespace to add to the new StartElement
namespaces
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement.
public StartElement
createStartElement(String
the prefix of the QName of the new StartElement
prefix
,
String
the uri of the QName of the new StartElement
namespaceUri
,
String
the local name of the QName of the new StartElement
localName
,
Iterator<E>
an unordered set of objects that implement Attribute to add to the new StartElement, may be null
attributes
,
Iterator<E>
an unordered set of objects that implement Namespace to add to the new StartElement, may be null
namespaces
,
NamespaceContext
the namespace context of this element
context
)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement.
private StartElement
createStartElement(QName name, Iterator<E> attributes, Iterator<E> namespaces, NamespaceContext context)

public void
setLocation(Location
the location to set on each event created
location
)

Implements abstract javax.xml.stream.XMLEventFactory.setLocation.

This method allows setting of the Location on each event that is created by this factory.
Inherited from javax.xml.stream.XMLEventFactory:
newDefaultFactorynewFactorynewFactorynewInstancenewInstance

Field Detail

fLocationback to summary
private Location fLocation

Constructor Detail

XMLEventFactoryImplback to summary
public XMLEventFactoryImpl()

Method Detail

createAttributeback to summary
public Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Doc from javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute

Parameters
prefix:String

the prefix of this attribute, may not be null

namespaceURI:String

the attribute value is set to this value, may not be null

localName:String

the local name of the XML name of the attribute, localName cannot be null

value:String

the attribute value to set, may not be null

Returns:Attribute

the Attribute with specified values

createAttributeback to summary
public Attribute createAttribute(String localName, String value)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Doc from javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute

Parameters
localName:String

the local name of the XML name of the attribute, localName cannot be null

value:String

the attribute value to set, may not be null

Returns:Attribute

the Attribute with specified values

createAttributeback to summary
public Attribute createAttribute(QName name, String value)

Implements abstract javax.xml.stream.XMLEventFactory.createAttribute.

Doc from javax.xml.stream.XMLEventFactory.createAttribute.

Create a new Attribute

Parameters
name:QName

the qualified name of the attribute, may not be null

value:String

the attribute value to set, may not be null

Returns:Attribute

the Attribute with specified values

createCDataback to summary
public Characters createCData(String content)

Implements abstract javax.xml.stream.XMLEventFactory.createCData.

Doc from javax.xml.stream.XMLEventFactory.createCData.

Create a Characters event with the CData flag set to true

Parameters
content:String

the string to create

Returns:Characters

a Characters event

createCharactersback to summary
public Characters createCharacters(String content)

Implements abstract javax.xml.stream.XMLEventFactory.createCharacters.

Doc from javax.xml.stream.XMLEventFactory.createCharacters.

Create a Characters event, this method does not check if the content is all whitespace. To create a space event use #createSpace(String)

Parameters
content:String

the string to create

Returns:Characters

a Characters event

createCommentback to summary
public Comment createComment(String text)

Implements abstract javax.xml.stream.XMLEventFactory.createComment.

Doc from javax.xml.stream.XMLEventFactory.createComment.

Create a comment.

Parameters
text:String

The text of the comment

Returns:Comment

a Comment event

createDTDback to summary
public DTD createDTD(String dtd)

Implements abstract javax.xml.stream.XMLEventFactory.createDTD.

Doc from javax.xml.stream.XMLEventFactory.createDTD.

Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification

Parameters
dtd:String

the text of the document type definition

Returns:DTD

a DTD event

createEndDocumentback to summary
public EndDocument createEndDocument()

Implements abstract javax.xml.stream.XMLEventFactory.createEndDocument.

Doc from javax.xml.stream.XMLEventFactory.createEndDocument.

Creates a new instance of an EndDocument event

Returns:EndDocument

an EndDocument event

createEndElementback to summary
public EndElement createEndElement(QName name, Iterator<E> namespaces)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Doc from javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement

Parameters
name:QName

the qualified name of the EndElement

namespaces:Iterator<E>

an optional unordered set of objects that implement Namespace that have gone out of scope, may be null

Returns:EndElement

an instance of the requested EndElement

createEndElementback to summary
public EndElement createEndElement(String prefix, String namespaceUri, String localName)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Doc from javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement

Parameters
prefix:String

the prefix of the QName of the new StartElement

namespaceUri:String

the uri of the QName of the new StartElement

localName:String

the local name of the QName of the new StartElement

Returns:EndElement

an instance of the requested EndElement

createEndElementback to summary
public EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator<E> namespaces)

Implements abstract javax.xml.stream.XMLEventFactory.createEndElement.

Doc from javax.xml.stream.XMLEventFactory.createEndElement.

Create a new EndElement

Parameters
prefix:String

the prefix of the QName of the new StartElement

namespaceUri:String

the uri of the QName of the new StartElement

localName:String

the local name of the QName of the new StartElement

namespaces:Iterator<E>

an unordered set of objects that implement Namespace that have gone out of scope, may be null

Returns:EndElement

an instance of the requested EndElement

createEntityReferenceback to summary
public EntityReference createEntityReference(String name, EntityDeclaration declaration)

Implements abstract javax.xml.stream.XMLEventFactory.createEntityReference.

Doc from javax.xml.stream.XMLEventFactory.createEntityReference.

Creates a new instance of a EntityReference event

Parameters
name:String

The name of the reference

declaration:EntityDeclaration

the declaration for the event

Returns:EntityReference

an EntityReference event

createIgnorableSpaceback to summary
public Characters createIgnorableSpace(String content)

Implements abstract javax.xml.stream.XMLEventFactory.createIgnorableSpace.

Doc from javax.xml.stream.XMLEventFactory.createIgnorableSpace.

Create an ignorable space

Parameters
content:String

the space to create

Returns:Characters

a Characters event

createNamespaceback to summary
public Namespace createNamespace(String namespaceURI)

Implements abstract javax.xml.stream.XMLEventFactory.createNamespace.

Doc from javax.xml.stream.XMLEventFactory.createNamespace.

Create a new default Namespace

Parameters
namespaceURI:String

the default namespace uri

Returns:Namespace

the Namespace with the specified value

createNamespaceback to summary
public Namespace createNamespace(String prefix, String namespaceUri)

Implements abstract javax.xml.stream.XMLEventFactory.createNamespace.

Doc from javax.xml.stream.XMLEventFactory.createNamespace.

Create a new Namespace

Parameters
prefix:String

the prefix of this namespace, may not be null

namespaceUri:String

the attribute value is set to this value, may not be null

Returns:Namespace

the Namespace with the specified values

createProcessingInstructionback to summary
public ProcessingInstruction createProcessingInstruction(String target, String data)

Implements abstract javax.xml.stream.XMLEventFactory.createProcessingInstruction.

Doc from javax.xml.stream.XMLEventFactory.createProcessingInstruction.

Create a processing instruction

Parameters
target:String

The target of the processing instruction

data:String

The text of the processing instruction

Returns:ProcessingInstruction

a ProcessingInstruction event

createSpaceback to summary
public Characters createSpace(String content)

Implements abstract javax.xml.stream.XMLEventFactory.createSpace.

Doc from javax.xml.stream.XMLEventFactory.createSpace.

Create a Characters event with the isSpace flag set to true

Parameters
content:String

the content of the space to create

Returns:Characters

a Characters event

createStartDocumentback to summary
public StartDocument createStartDocument()

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Doc from javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event

Returns:StartDocument

a StartDocument event

createStartDocumentback to summary
public StartDocument createStartDocument(String encoding, String version, boolean standalone)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Doc from javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event

Parameters
encoding:String

the encoding style

version:String

the XML version

standalone:boolean

the status of standalone may be set to "true" or "false"

Returns:StartDocument

a StartDocument event

createStartDocumentback to summary
public StartDocument createStartDocument(String encoding, String version)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Doc from javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event

Parameters
encoding:String

the encoding style

version:String

the XML version

Returns:StartDocument

a StartDocument event

createStartDocumentback to summary
public StartDocument createStartDocument(String encoding)

Implements abstract javax.xml.stream.XMLEventFactory.createStartDocument.

Doc from javax.xml.stream.XMLEventFactory.createStartDocument.

Creates a new instance of a StartDocument event

Parameters
encoding:String

the encoding style

Returns:StartDocument

a StartDocument event

createStartElementback to summary
public StartElement createStartElement(QName name, Iterator<E> attributes, Iterator<E> namespaces)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Doc from javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.

Parameters
name:QName

the qualified name of the attribute, may not be null

attributes:Iterator<E>

an optional unordered set of objects that implement Attribute to add to the new StartElement, may be null

namespaces:Iterator<E>

an optional unordered set of objects that implement Namespace to add to the new StartElement, may be null

Returns:StartElement

an instance of the requested StartElement

createStartElementback to summary
public StartElement createStartElement(String prefix, String namespaceUri, String localName)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Doc from javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement. This defaults the NamespaceContext to an empty NamespaceContext. Querying this event for its namespaces or attributes will result in an empty iterator being returned.

Parameters
prefix:String

the prefix of the QName of the new StartElement

namespaceUri:String

the uri of the QName of the new StartElement

localName:String

the local name of the QName of the new StartElement

Returns:StartElement

an instance of the requested StartElement

createStartElementback to summary
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<E> attributes, Iterator<E> namespaces)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Doc from javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.

Parameters
prefix:String

the prefix of the QName of the new StartElement

namespaceUri:String

the uri of the QName of the new StartElement

localName:String

the local name of the QName of the new StartElement

attributes:Iterator<E>

an unordered set of objects that implement Attribute to add to the new StartElement

namespaces:Iterator<E>

an unordered set of objects that implement Namespace to add to the new StartElement

Returns:StartElement

an instance of the requested StartElement

createStartElementback to summary
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<E> attributes, Iterator<E> namespaces, NamespaceContext context)

Implements abstract javax.xml.stream.XMLEventFactory.createStartElement.

Doc from javax.xml.stream.XMLEventFactory.createStartElement.

Create a new StartElement. Namespaces can be added to this StartElement by passing in an Iterator that walks over a set of Namespace interfaces. Attributes can be added to this StartElement by passing an iterator that walks over a set of Attribute interfaces.

Parameters
prefix:String

the prefix of the QName of the new StartElement

namespaceUri:String

the uri of the QName of the new StartElement

localName:String

the local name of the QName of the new StartElement

attributes:Iterator<E>

an unordered set of objects that implement Attribute to add to the new StartElement, may be null

namespaces:Iterator<E>

an unordered set of objects that implement Namespace to add to the new StartElement, may be null

context:NamespaceContext

the namespace context of this element

Returns:StartElement

an instance of the requested StartElement

createStartElementback to summary
private StartElement createStartElement(QName name, Iterator<E> attributes, Iterator<E> namespaces, NamespaceContext context)
setLocationback to summary
public void setLocation(Location location)

Implements abstract javax.xml.stream.XMLEventFactory.setLocation.

Doc from javax.xml.stream.XMLEventFactory.setLocation.

This method allows setting of the Location on each event that is created by this factory. The values are copied by value into the events created by this factory. To reset the location information set the location to null.

Parameters
location:Location

the location to set on each event created