public class StAXEventFactory extends XMLEventFactory
Constructor and Description |
---|
StAXEventFactory()
Creates a new instance of StAXEventFactory
|
Modifier and Type | Method and Description |
---|---|
Attribute |
createAttribute(QName name,
String value) |
Attribute |
createAttribute(String localName,
String value)
Create a new Attribute
|
Attribute |
createAttribute(String prefix,
String namespaceURI,
String localName,
String value)
Create a new Attribute
|
Characters |
createCData(String content)
Create a Characters event with the CData flag set to true
|
Characters |
createCharacters(String content)
Create a Characters event, this method does not check if the content
is all whitespace.
|
Comment |
createComment(String text)
Create a comment
|
DTD |
createDTD(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
|
EndDocument |
createEndDocument() |
EndElement |
createEndElement(QName name,
Iterator namespaces)
Create a new EndElement
|
EndElement |
createEndElement(String prefix,
String namespaceUri,
String localName)
Create a new EndElement
|
EndElement |
createEndElement(String prefix,
String namespaceUri,
String localName,
Iterator namespaces)
Create a new EndElement
|
EntityReference |
createEntityReference(String name,
EntityDeclaration entityDeclaration)
Creates a new instance of a EntityReference event
|
Characters |
createIgnorableSpace(String content)
Create an ignorable space
|
Namespace |
createNamespace(String namespaceURI)
Create a new default Namespace
|
Namespace |
createNamespace(String prefix,
String namespaceURI)
Create a new Namespace
|
ProcessingInstruction |
createProcessingInstruction(String target,
String data)
Create a processing instruction
|
Characters |
createSpace(String content)
Create a Characters event with the isSpace flag set to true
|
StartDocument |
createStartDocument()
Creates a new instance of a StartDocument event
|
StartDocument |
createStartDocument(String encoding)
Creates a new instance of a StartDocument event
|
StartDocument |
createStartDocument(String encoding,
String version)
Creates a new instance of a StartDocument event
|
StartDocument |
createStartDocument(String encoding,
String version,
boolean standalone)
Creates a new instance of a StartDocument event
|
StartElement |
createStartElement(QName name,
Iterator attributes,
Iterator namespaces)
Create a new StartElement.
|
StartElement |
createStartElement(String prefix,
String namespaceUri,
String localName) |
StartElement |
createStartElement(String prefix,
String namespaceUri,
String localName,
Iterator attributes,
Iterator namespaces) |
StartElement |
createStartElement(String prefix,
String namespaceUri,
String localName,
Iterator attributes,
Iterator namespaces,
NamespaceContext context) |
void |
setLocation(Location location)
This method allows setting of the Location on each event that
is created by this factory.
|
newFactory, newFactory, newInstance, newInstance
public StAXEventFactory()
public void setLocation(Location location)
setLocation
in class XMLEventFactory
location
- the location to set on each event createdpublic Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)
createAttribute
in class XMLEventFactory
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 Attribute createAttribute(String localName, String value)
createAttribute
in class XMLEventFactory
localName
- the local name of the XML name of the attribute, localName cannot be nullvalue
- the attribute value to set, may not be nullpublic Attribute createAttribute(QName name, String value)
createAttribute
in class XMLEventFactory
public Namespace createNamespace(String namespaceURI)
createNamespace
in class XMLEventFactory
namespaceURI
- the default namespace uripublic Namespace createNamespace(String prefix, String namespaceURI)
createNamespace
in class XMLEventFactory
prefix
- the prefix of this namespace, may not be nullnamespaceURI
- the attribute value is set to this value, may not be nullpublic StartElement createStartElement(QName name, Iterator attributes, Iterator namespaces)
createStartElement
in class XMLEventFactory
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 StartElement createStartElement(String prefix, String namespaceUri, String localName)
createStartElement
in class XMLEventFactory
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
createStartElement
in class XMLEventFactory
public StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
createStartElement
in class XMLEventFactory
public EndElement createEndElement(QName name, Iterator namespaces)
createEndElement
in class XMLEventFactory
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 EndElement createEndElement(String prefix, String namespaceUri, String localName)
createEndElement
in class XMLEventFactory
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 StartElementpublic EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces)
createEndElement
in class XMLEventFactory
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 nullpublic Characters createCharacters(String content)
createCharacters
in class XMLEventFactory
content
- the string to createpublic Characters createCData(String content)
createCData
in class XMLEventFactory
content
- the string to createpublic Characters createSpace(String content)
createSpace
in class XMLEventFactory
content
- the content of the space to createpublic Characters createIgnorableSpace(String content)
createIgnorableSpace
in class XMLEventFactory
content
- the space to createpublic StartDocument createStartDocument()
createStartDocument
in class XMLEventFactory
public StartDocument createStartDocument(String encoding)
createStartDocument
in class XMLEventFactory
encoding
- the encoding stylepublic StartDocument createStartDocument(String encoding, String version)
createStartDocument
in class XMLEventFactory
encoding
- the encoding styleversion
- the XML versionpublic StartDocument createStartDocument(String encoding, String version, boolean standalone)
createStartDocument
in class XMLEventFactory
encoding
- the encoding styleversion
- the XML versionstandalone
- the status of standalone may be set to "true" or "false"public EndDocument createEndDocument()
createEndDocument
in class XMLEventFactory
public EntityReference createEntityReference(String name, EntityDeclaration entityDeclaration)
createEntityReference
in class XMLEventFactory
name
- The name of the referenceentityDeclaration
- the declaration for the eventpublic Comment createComment(String text)
createComment
in class XMLEventFactory
text
- The text of the comment
a Comment eventpublic DTD createDTD(String dtd)
createDTD
in class XMLEventFactory
dtd
- the text of the document type definitionpublic ProcessingInstruction createProcessingInstruction(String target, String data)
createProcessingInstruction
in class XMLEventFactory
target
- The target of the processing instructiondata
- The text of the processing instructionCopyright © 2024 Oracle Corpration. All rights reserved.