java.lang.Object | |
↳ | javax.xml.stream.XMLEventFactory |
This interface defines a utility class for creating instances of XMLEvents
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a new Attribute
| |||||||||||
Create a new Attribute
| |||||||||||
Create a new Attribute
| |||||||||||
Create a Characters event with the CData flag set to true
| |||||||||||
Create a Characters event, this method does not check if the content
is all whitespace.
| |||||||||||
Create a comment
| |||||||||||
Create a document type definition event
This string contains the entire document type declaration that matches
the doctypedecl in the XML 1.0 specification
| |||||||||||
Creates a new instance of an EndDocument event
| |||||||||||
Create a new EndElement
| |||||||||||
Create a new EndElement
| |||||||||||
Create a new EndElement
| |||||||||||
Creates a new instance of a EntityReference event
| |||||||||||
Create an ignorable space
| |||||||||||
Create a new default Namespace
| |||||||||||
Create a new Namespace
| |||||||||||
Create a processing instruction
| |||||||||||
Create a Characters event with the isSpace flag set to true
| |||||||||||
Creates a new instance of a StartDocument event
| |||||||||||
Creates a new instance of a StartDocument event
| |||||||||||
Creates a new instance of a StartDocument event
| |||||||||||
Creates a new instance of a StartDocument event
| |||||||||||
Create a new StartElement.
| |||||||||||
Create a new StartElement.
| |||||||||||
Create a new StartElement.
| |||||||||||
Create a new StartElement.
| |||||||||||
Create a new instance of the factory.
| |||||||||||
Create a new instance of the factory.
| |||||||||||
This method is deprecated.
This method has been deprecated to maintain API consistency.
All newInstance methods have been replaced with corresponding
newFactory methods. The replacement
newFactory(java.lang.String, java.lang.ClassLoader)
method defines no changes in behavior.
| |||||||||||
Create a new instance of the factory
| |||||||||||
This method allows setting of the Location on each event that
is created by this factory.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Create a new Attribute
localName | the local name of the XML name of the attribute, localName cannot be null |
---|---|
value | the attribute value to set, may not be null |
Create a new Attribute
name | the qualified name of the attribute, may not be null |
---|---|
value | the attribute value to set, may not be null |
Create a new Attribute
prefix | the prefix of this attribute, may not be null |
---|---|
namespaceURI | the attribute value is set to this value, may not be null |
localName | the local name of the XML name of the attribute, localName cannot be null |
value | the attribute value to set, may not be null |
Create a Characters event with the CData flag set to true
content | the string to create |
---|
Create a Characters event, this method does not check if the content is all whitespace. To create a space event use #createSpace(String)
content | the string to create |
---|
Create a comment
text | The text of the comment a Comment event |
---|
Create a document type definition event This string contains the entire document type declaration that matches the doctypedecl in the XML 1.0 specification
dtd | the text of the document type definition |
---|
Creates a new instance of an EndDocument event
Create a new EndElement
prefix | the prefix of the QName of the new StartElement |
---|---|
namespaceUri | the uri of the QName of the new StartElement |
localName | the local name of the QName of the new StartElement |
Create a new EndElement
prefix | the prefix of the QName of the new StartElement |
---|---|
namespaceUri | the uri of the QName of the new StartElement |
localName | the local name of the QName of the new StartElement |
namespaces | an unordered set of objects that implement Namespace that have gone out of scope, may be null |
Create a new EndElement
name | the qualified name of the EndElement |
---|---|
namespaces | an optional unordered set of objects that implement Namespace that have gone out of scope, may be null |
Creates a new instance of a EntityReference event
name | The name of the reference |
---|---|
declaration | the declaration for the event |
Create an ignorable space
content | the space to create |
---|
Create a new default Namespace
namespaceURI | the default namespace uri |
---|
Create a new Namespace
prefix | the prefix of this namespace, may not be null |
---|---|
namespaceUri | the attribute value is set to this value, may not be null |
Create a processing instruction
target | The target of the processing instruction |
---|---|
data | The text of the processing instruction |
Create a Characters event with the isSpace flag set to true
content | the content of the space to create |
---|
Creates a new instance of a StartDocument event
encoding | the encoding style |
---|
Creates a new instance of a StartDocument event
Creates a new instance of a StartDocument event
encoding | the encoding style |
---|---|
version | the XML version |
standalone | the status of standalone may be set to "true" or "false" |
Creates a new instance of a StartDocument event
encoding | the encoding style |
---|---|
version | the XML version |
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.
prefix | the prefix of the QName of the new StartElement |
---|---|
namespaceUri | the uri of the QName of the new StartElement |
localName | the local name of the QName of the new StartElement |
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.
prefix | the prefix of the QName of the new StartElement |
---|---|
namespaceUri | the uri of the QName of the new StartElement |
localName | the local name of the QName of the new StartElement |
attributes | an unordered set of objects that implement Attribute to add to the new StartElement |
namespaces | an unordered set of objects that implement Namespace to add to the new StartElement |
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.
prefix | the prefix of the QName of the new StartElement |
---|---|
namespaceUri | the uri of the QName of the new StartElement |
localName | the local name of the QName of the new StartElement |
attributes | an unordered set of objects that implement Attribute to add to the new StartElement, may be null |
namespaces | an unordered set of objects that implement Namespace to add to the new StartElement, may be null |
context | the namespace context of this element |
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.
name | the qualified name of the attribute, may not be null |
---|---|
attributes | an optional unordered set of objects that implement Attribute to add to the new StartElement, may be null |
namespaces | an optional unordered set of objects that implement Namespace to add to the new StartElement, may be null |
Create a new instance of the factory. This static method creates a new factory instance. This method uses the following ordered lookup procedure to determine the XMLEventFactory implementation class to load: Use the javax.xml.stream.XMLEventFactory system property. Use the properties file "lib/stax.properties" in the JRE directory. This configuration file is in standard java.util.Properties format and contains the fully qualified name of the implementation class with the key being the system property defined above. Use the Services API (as detailed in the JAR specification), if available, to determine the classname. The Services API will look for a classname in the file META-INF/services/javax.xml.stream.XMLEventFactory in jars available to the runtime. Platform default XMLEventFactory instance. Once an application has obtained a reference to a XMLEventFactory it can use the factory to configure and obtain stream instances. Note that this is a new method that replaces the deprecated newInstance() method. No changes in behavior are defined by this replacement method relative to the deprecated method.
FactoryConfigurationError | if an instance of this factory cannot be loaded |
---|
Create a new instance of the factory. If the classLoader argument is null, then the ContextClassLoader is used. Note that this is a new method that replaces the deprecated newInstance(String factoryId, ClassLoader classLoader) method. No changes in behavior are defined by this replacement method relative to the deprecated method.
factoryId | Name of the factory to find, same as a property name |
---|---|
classLoader | classLoader to use |
FactoryConfigurationError | if an instance of this factory cannot be loaded |
---|
This method is deprecated.
This method has been deprecated to maintain API consistency.
All newInstance methods have been replaced with corresponding
newFactory methods. The replacement newFactory(java.lang.String, java.lang.ClassLoader)
method defines no changes in behavior.
Create a new instance of the factory
factoryId | Name of the factory to find, same as a property name |
---|---|
classLoader | classLoader to use |
FactoryConfigurationError | if an instance of this factory cannot be loaded |
---|
Create a new instance of the factory
FactoryConfigurationError | if an instance of this factory cannot be loaded |
---|
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.
location | the location to set on each event created |
---|