|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.xml.stream.XMLEventFactory
public abstract class XMLEventFactory
This interface defines a utility class for creating instances of XMLEvents
StartElement
,
EndElement
,
ProcessingInstruction
,
Comment
,
Characters
,
StartDocument
,
EndDocument
,
DTD
Constructor Summary | |
---|---|
protected |
XMLEventFactory()
|
Method Summary | |
---|---|
abstract javax.xml.stream.events.Attribute |
createAttribute(javax.xml.namespace.QName name,
java.lang.String value)
Create a new Attribute |
abstract javax.xml.stream.events.Attribute |
createAttribute(java.lang.String localName,
java.lang.String value)
Create a new Attribute |
abstract javax.xml.stream.events.Attribute |
createAttribute(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
Create a new Attribute |
abstract javax.xml.stream.events.Characters |
createCData(java.lang.String content)
Create a Characters event with the CData flag set to true |
abstract javax.xml.stream.events.Characters |
createCharacters(java.lang.String content)
Create a Characters event, this method does not check if the content is all whitespace. |
abstract javax.xml.stream.events.Comment |
createComment(java.lang.String text)
Create a comment |
abstract javax.xml.stream.events.DTD |
createDTD(java.lang.String 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 javax.xml.stream.events.EndDocument |
createEndDocument()
Creates a new instance of an EndDocument event |
abstract javax.xml.stream.events.EndElement |
createEndElement(javax.xml.namespace.QName name,
java.util.Iterator namespaces)
Create a new EndElement |
abstract javax.xml.stream.events.EndElement |
createEndElement(java.lang.String prefix,
java.lang.String namespaceUri,
java.lang.String localName)
Create a new EndElement |
abstract javax.xml.stream.events.EndElement |
createEndElement(java.lang.String prefix,
java.lang.String namespaceUri,
java.lang.String localName,
java.util.Iterator namespaces)
Create a new EndElement |
abstract javax.xml.stream.events.EntityReference |
createEntityReference(java.lang.String name,
javax.xml.stream.events.EntityDeclaration declaration)
Creates a new instance of a EntityReference event |
abstract javax.xml.stream.events.Characters |
createIgnorableSpace(java.lang.String content)
Create an ignorable space |
abstract javax.xml.stream.events.Namespace |
createNamespace(java.lang.String namespaceURI)
Create a new default Namespace |
abstract javax.xml.stream.events.Namespace |
createNamespace(java.lang.String prefix,
java.lang.String namespaceUri)
Create a new Namespace |
abstract javax.xml.stream.events.ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Create a processing instruction |
abstract javax.xml.stream.events.Characters |
createSpace(java.lang.String content)
Create a Characters event with the isSpace flag set to true |
abstract javax.xml.stream.events.StartDocument |
createStartDocument()
Creates a new instance of a StartDocument event |
abstract javax.xml.stream.events.StartDocument |
createStartDocument(java.lang.String encoding)
Creates a new instance of a StartDocument event |
abstract javax.xml.stream.events.StartDocument |
createStartDocument(java.lang.String encoding,
java.lang.String version)
Creates a new instance of a StartDocument event |
abstract javax.xml.stream.events.StartDocument |
createStartDocument(java.lang.String encoding,
java.lang.String version,
boolean standalone)
Creates a new instance of a StartDocument event |
abstract javax.xml.stream.events.StartElement |
createStartElement(javax.xml.namespace.QName name,
java.util.Iterator attributes,
java.util.Iterator namespaces)
Create a new StartElement. |
abstract javax.xml.stream.events.StartElement |
createStartElement(java.lang.String prefix,
java.lang.String namespaceUri,
java.lang.String localName)
Create a new StartElement. |
abstract javax.xml.stream.events.StartElement |
createStartElement(java.lang.String prefix,
java.lang.String namespaceUri,
java.lang.String localName,
java.util.Iterator attributes,
java.util.Iterator namespaces)
Create a new StartElement. |
abstract javax.xml.stream.events.StartElement |
createStartElement(java.lang.String prefix,
java.lang.String namespaceUri,
java.lang.String localName,
java.util.Iterator attributes,
java.util.Iterator namespaces,
javax.xml.namespace.NamespaceContext context)
Create a new StartElement. |
static XMLEventFactory |
newInstance()
Create a new instance of the factory |
static XMLEventFactory |
newInstance(java.lang.String factoryId,
java.lang.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 static XMLEventFactory newInstance() throws FactoryConfigurationError
FactoryConfigurationError
- if an instance of this factory cannot be loadedpublic static XMLEventFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
factoryId
- Name of the factory to find, same as
a property nameclassLoader
- classLoader to use
FactoryConfigurationError
- if an instance of this factory cannot be loadedpublic abstract void setLocation(Location location)
location
- the location to set on each event createdpublic abstract javax.xml.stream.events.Attribute createAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName, java.lang.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 null
public abstract javax.xml.stream.events.Attribute createAttribute(java.lang.String localName, java.lang.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 null
public abstract javax.xml.stream.events.Attribute createAttribute(javax.xml.namespace.QName name, java.lang.String value)
name
- the qualified name of the attribute, may not be nullvalue
- the attribute value to set, may not be null
public abstract javax.xml.stream.events.Namespace createNamespace(java.lang.String namespaceURI)
namespaceURI
- the default namespace uri
public abstract javax.xml.stream.events.Namespace createNamespace(java.lang.String prefix, java.lang.String namespaceUri)
prefix
- the prefix of this namespace, may not be nullnamespaceUri
- the attribute value is set to this value, may not be null
public abstract javax.xml.stream.events.StartElement createStartElement(javax.xml.namespace.QName name, java.util.Iterator attributes, java.util.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 null
public abstract javax.xml.stream.events.StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName)
namespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementprefix
- the prefix of the QName of the new StartElement
public abstract javax.xml.stream.events.StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator attributes, java.util.Iterator namespaces)
namespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementprefix
- the prefix 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 StartElement
public abstract javax.xml.stream.events.StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator attributes, java.util.Iterator namespaces, javax.xml.namespace.NamespaceContext context)
namespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementprefix
- the prefix 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 element
public abstract javax.xml.stream.events.EndElement createEndElement(javax.xml.namespace.QName name, java.util.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 null
public abstract javax.xml.stream.events.EndElement createEndElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName)
namespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementprefix
- the prefix of the QName of the new StartElement
public abstract javax.xml.stream.events.EndElement createEndElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator namespaces)
namespaceUri
- the uri of the QName of the new StartElementlocalName
- the local name of the QName of the new StartElementprefix
- the prefix of the QName of the new StartElementnamespaces
- an unordered set of objects that implement
Namespace that have gone out of scope, may be null
public abstract javax.xml.stream.events.Characters createCharacters(java.lang.String content)
content
- the string to create
public abstract javax.xml.stream.events.Characters createCData(java.lang.String content)
content
- the string to create
public abstract javax.xml.stream.events.Characters createSpace(java.lang.String content)
content
- the content of the space to create
public abstract javax.xml.stream.events.Characters createIgnorableSpace(java.lang.String content)
content
- the space to create
public abstract javax.xml.stream.events.StartDocument createStartDocument()
public abstract javax.xml.stream.events.StartDocument createStartDocument(java.lang.String encoding, java.lang.String version, boolean standalone)
encoding
- the encoding styleversion
- the XML versionstandalone
- the status of standalone may be set to "true" or "false"
public abstract javax.xml.stream.events.StartDocument createStartDocument(java.lang.String encoding, java.lang.String version)
encoding
- the encoding styleversion
- the XML version
public abstract javax.xml.stream.events.StartDocument createStartDocument(java.lang.String encoding)
encoding
- the encoding style
public abstract javax.xml.stream.events.EndDocument createEndDocument()
public abstract javax.xml.stream.events.EntityReference createEntityReference(java.lang.String name, javax.xml.stream.events.EntityDeclaration declaration)
name
- The name of the referencedeclaration
- the declaration for the event
public abstract javax.xml.stream.events.Comment createComment(java.lang.String text)
text
- The text of the comment
a Comment eventpublic abstract javax.xml.stream.events.ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
target
- The target of the processing instructiondata
- The text of the processing instruction
public abstract javax.xml.stream.events.DTD createDTD(java.lang.String dtd)
dtd
- the text of the document type definition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |