Top Fields Constructors Methods
com.sun.xml.internal.stream.events

public Class XMLEventFactoryImpl

extends XMLEventFactory
Class Inheritance
Imports
java.util.Iterator, javax.xml.namespace.NamespaceContext, .QName, javax.xml.stream.XMLEventFactory, .Location, javax.xml.stream.events.Attribute, .Characters, .ProcessingInstruction, .Namespace, .EntityDeclaration, .EntityReference, .StartDocument, .StartElement

Author
Neeraj Bajaj, k venugopal

Field Summary

Modifier and TypeField and Description
pack-priv Location

Constructor Summary

AccessConstructor and Description
public
XMLEventFactoryImpl()

Creates a new instance of XMLEventFactory

Method Summary

Modifier and TypeMethod and Description
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 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 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<? extends Namespace>
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<? extends Namespace>
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
entityDeclaration
)

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
)

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
,
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 StartElement
createStartElement(QName
the qualified name of the attribute, may not be null
name
,
Iterator<? extends Attribute>
an optional unordered set of objects that implement Attribute to add to the new StartElement, may be null
attributes
,
Iterator<? extends Namespace>
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<? extends Attribute>
an unordered set of objects that implement Attribute to add to the new StartElement
attributes
,
Iterator<? extends Namespace>
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<? extends Attribute>
an unordered set of objects that implement Attribute to add to the new StartElement, may be null
attributes
,
Iterator<? extends Namespace>
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.

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

locationback to summary
pack-priv Location location

Constructor Detail

XMLEventFactoryImplback to summary
public XMLEventFactoryImpl()

Creates a new instance of XMLEventFactory

Method Detail

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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
createEndElementback to summary
public EndElement createEndElement(QName name, Iterator<? extends Namespace> 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<? extends Namespace>

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

Annotations
@Override
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

Annotations
@Override
createEndElementback to summary
public EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator<? extends Namespace> 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<? extends Namespace>

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

Annotations
@Override
createEntityReferenceback to summary
public EntityReference createEntityReference(String name, EntityDeclaration entityDeclaration)

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

entityDeclaration:EntityDeclaration

the declaration for the event

Returns:EntityReference

an EntityReference event

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
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

Annotations
@Override
createStartElementback to summary
public StartElement createStartElement(QName name, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> 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<? extends Attribute>

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

namespaces:Iterator<? extends Namespace>

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

Annotations
@Override
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

Annotations
@Override
createStartElementback to summary
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> 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<? extends Attribute>

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

namespaces:Iterator<? extends Namespace>

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

Returns:StartElement

an instance of the requested StartElement

Annotations
@Override
createStartElementback to summary
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator<? extends Attribute> attributes, Iterator<? extends Namespace> 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<? extends Attribute>

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

namespaces:Iterator<? extends Namespace>

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

Annotations
@Override
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

Annotations
@Override