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, newInstancepublic StAXEventFactory()
public void setLocation(Location location)
setLocation in class XMLEventFactorylocation - the location to set on each event createdpublic Attribute createAttribute(String prefix, String namespaceURI, String localName, String value)
createAttribute in class XMLEventFactoryprefix - 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 XMLEventFactorylocalName - 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 XMLEventFactorypublic Namespace createNamespace(String namespaceURI)
createNamespace in class XMLEventFactorynamespaceURI - the default namespace uripublic Namespace createNamespace(String prefix, String namespaceURI)
createNamespace in class XMLEventFactoryprefix - 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 XMLEventFactoryname - 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 XMLEventFactorypublic StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces)
createStartElement in class XMLEventFactorypublic StartElement createStartElement(String prefix, String namespaceUri, String localName, Iterator attributes, Iterator namespaces, NamespaceContext context)
createStartElement in class XMLEventFactorypublic EndElement createEndElement(QName name, Iterator namespaces)
createEndElement in class XMLEventFactoryname - 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 XMLEventFactorynamespaceUri - 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 XMLEventFactorynamespaceUri - 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 XMLEventFactorycontent - the string to createpublic Characters createCData(String content)
createCData in class XMLEventFactorycontent - the string to createpublic Characters createSpace(String content)
createSpace in class XMLEventFactorycontent - the content of the space to createpublic Characters createIgnorableSpace(String content)
createIgnorableSpace in class XMLEventFactorycontent - the space to createpublic StartDocument createStartDocument()
createStartDocument in class XMLEventFactorypublic StartDocument createStartDocument(String encoding)
createStartDocument in class XMLEventFactoryencoding - the encoding stylepublic StartDocument createStartDocument(String encoding, String version)
createStartDocument in class XMLEventFactoryencoding - the encoding styleversion - the XML versionpublic StartDocument createStartDocument(String encoding, String version, boolean standalone)
createStartDocument in class XMLEventFactoryencoding - the encoding styleversion - the XML versionstandalone - the status of standalone may be set to "true" or "false"public EndDocument createEndDocument()
createEndDocument in class XMLEventFactorypublic EntityReference createEntityReference(String name, EntityDeclaration entityDeclaration)
createEntityReference in class XMLEventFactoryname - The name of the referenceentityDeclaration - the declaration for the eventpublic Comment createComment(String text)
createComment in class XMLEventFactorytext - The text of the comment
a Comment eventpublic DTD createDTD(String dtd)
createDTD in class XMLEventFactorydtd - the text of the document type definitionpublic ProcessingInstruction createProcessingInstruction(String target, String data)
createProcessingInstruction in class XMLEventFactorytarget - The target of the processing instructiondata - The text of the processing instructionCopyright © 2005–2017 Oracle Corporation. All rights reserved.