Indicates a serious configuration error.
| |
Indicates a serious configuration error. TODO: support all constructors
|
Indicates a serious configuration error.
|
Factory that creates new javax.xml.datatype Object s that map XML to/from Java Object s. newInstance() is used to create a new DatatypeFactory. The following implementation resolution mechanisms are used in the following order:
| |
Factory that creates new
|
Factory that creates new
|
DATATYPEFACTORY_IMPLEMENTATION_CLASSpublic static final java.lang.String DATATYPEFACTORY_IMPLEMENTATION_CLASS
| |
DATATYPEFACTORY_IMPLEMENTATION_CLASSpublic static final java.lang.String DATATYPEFACTORY_IMPLEMENTATION_CLASS
|
DATATYPEFACTORY_IMPLEMENTATION_CLASSpublic static final java.lang.String DATATYPEFACTORY_IMPLEMENTATION_CLASS
|
newDurationpublic Duration newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
| |
newDurationpublic Duration newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
|
newDurationpublic Duration newDuration(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds)
|
newDurationpublic abstract Duration newDuration(boolean isPositive, java.math.BigInteger years, java.math.BigInteger months, java.math.BigInteger days, java.math.BigInteger hours, java.math.BigInteger minutes, java.math.BigDecimal seconds)
| |
newDurationpublic abstract Duration newDuration(boolean isPositive, java.math.BigInteger years, java.math.BigInteger months, java.math.BigInteger days, java.math.BigInteger hours, java.math.BigInteger minutes, java.math.BigDecimal seconds)
|
newDurationpublic abstract Duration newDuration(boolean isPositive, java.math.BigInteger years, java.math.BigInteger months, java.math.BigInteger days, java.math.BigInteger hours, java.math.BigInteger minutes, java.math.BigDecimal seconds)
|
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)
| |
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)
|
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, int day, int hour, int minute, int second)
|
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, java.math.BigInteger day, java.math.BigInteger hour, java.math.BigInteger minute, java.math.BigInteger second)
| |
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, java.math.BigInteger day, java.math.BigInteger hour, java.math.BigInteger minute, java.math.BigInteger second)
|
newDurationDayTimepublic Duration newDurationDayTime(boolean isPositive, java.math.BigInteger day, java.math.BigInteger hour, java.math.BigInteger minute, java.math.BigInteger second)
|
newDurationDayTimepublic Duration newDurationDayTime(java.lang.String lexicalRepresentation)
| |
newDurationDayTimepublic Duration newDurationDayTime(java.lang.String lexicalRepresentation)
|
newDurationDayTimepublic Duration newDurationDayTime(java.lang.String lexicalRepresentation)
|
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, int year, int month)
| |
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, int year, int month)
|
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, int year, int month)
|
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, java.math.BigInteger year, java.math.BigInteger month)
| |
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, java.math.BigInteger year, java.math.BigInteger month)
|
newDurationYearMonthpublic Duration newDurationYearMonth(boolean isPositive, java.math.BigInteger year, java.math.BigInteger month)
|
newDurationYearMonthpublic Duration newDurationYearMonth(java.lang.String lexicalRepresentation)
| |
newDurationYearMonthpublic Duration newDurationYearMonth(java.lang.String lexicalRepresentation)
|
newDurationYearMonthpublic Duration newDurationYearMonth(java.lang.String lexicalRepresentation)
|
newInstancepublic static DatatypeFactory newInstance() throws DatatypeConfigurationException
| |
newInstancepublic static DatatypeFactory newInstance() throws DatatypeConfigurationException
|
newInstancepublic static DatatypeFactory newInstance() throws DatatypeConfigurationException
|
newInstancepublic static DatatypeFactory newInstance(java.lang.String factoryClassName, java.lang.ClassLoader classLoader) throws DatatypeConfigurationException
|
Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. A Duration object represents a period of Gregorian time, which consists of six fields (years, months, days, hours, minutes, and seconds) plus a sign (+/-) field. The first five fields have non-negative (>=0) integers or null (which represents that the field is not set), and the seconds field has a non-negative decimal or null. A negative sign indicates a negative duration. This class provides a number of methods that make it easy to use for the duration datatype of XML Schema 1.0 with the errata. Order relationshipDuration objects only have partial order, where two values A and B maybe either:
For example, 30 days cannot be meaningfully compared to one month. The compare(Duration duration) method implements this relationship. See the isLongerThan(Duration) method for details about the order relationship among Duration objects. Operations over DurationThis class provides a set of basic arithmetic operations, such as addition, subtraction and multiplication. Because durations don't have total order, an operation could fail for some combinations of operations. For example, you cannot subtract 15 days from 1 month. See the javadoc of those methods for detailed conditions where this could happen. Also, division of a duration by a number is not provided because the Duration class can only deal with finite precision decimal numbers. For example, one cannot represent 1 sec divided by 3. However, you could substitute a division by 3 with multiplying by numbers such as 0.3 or 0.333. Range of allowed valuesBecause some operations of Duration rely on Calendar even though Duration can hold very large or very small values, some of the methods may not work correctly on such Duration s. The impacted methods document their dependency on Calendar .
| |
Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. A Duration object represents a period of Gregorian time, which consists of six fields (years, months, days, hours, minutes, and seconds) plus a sign (+/-) field. The first five fields have non-negative (>=0) integers or null (which represents that the field is not set), and the seconds field has a non-negative decimal or null. A negative sign indicates a negative duration. This class provides a number of methods that make it easy to use for the duration datatype of XML Schema 1.0 with the errata. Order relationshipDuration objects only have partial order, where two values A and B maybe either:
For example, 30 days cannot be meaningfully compared to one month.
The See the Operations over DurationThis class provides a set of basic arithmetic operations, such as addition, subtraction and multiplication. Because durations don't have total order, an operation could fail for some combinations of operations. For example, you cannot subtract 15 days from 1 month. See the javadoc of those methods for detailed conditions where this could happen. Also, division of a duration by a number is not provided because
the However, you could substitute a division by 3 with multiplying by numbers such as 0.3 or 0.333. Range of allowed values
Because some operations of
|
Immutable representation of a time span as defined in the W3C XML Schema 1.0 specification. A Duration object represents a period of Gregorian time, which consists of six fields (years, months, days, hours, minutes, and seconds) plus a sign (+/-) field. The first five fields have non-negative (>=0) integers or null (which represents that the field is not set), and the seconds field has a non-negative decimal or null. A negative sign indicates a negative duration. This class provides a number of methods that make it easy to use for the duration datatype of XML Schema 1.0 with the errata. Order relationshipDuration objects only have partial order, where two values A and B maybe either:
For example, 30 days cannot be meaningfully compared to one month.
The See the Operations over DurationThis class provides a set of basic arithmetic operations, such as addition, subtraction and multiplication. Because durations don't have total order, an operation could fail for some combinations of operations. For example, you cannot subtract 15 days from 1 month. See the javadoc of those methods for detailed conditions where this could happen. Also, division of a duration by a number is not provided because
the However, you could substitute a division by 3 with multiplying by numbers such as 0.3 or 0.333. Range of allowed values
Because some operations of
|
equalspublic boolean equals(java.lang.Object duration)
| |
equalspublic boolean equals(java.lang.Object duration)
|
equalspublic boolean equals(java.lang.Object duration)
|
Representation for W3C XML Schema 1.0 date/time datatypes. Specifically, these date/time datatypes are DatatypeConstants.DATETIME , DatatypeConstants.TIME , DatatypeConstants.DATE , DatatypeConstants.GYEARMONTH , DatatypeConstants.GMONTHDAY , DatatypeConstants.GYEAR , DatatypeConstants.GMONTH , and DatatypeConstants.GDAY defined in the XML Namespace "http://www.w3.org/2001/XMLSchema". These datatypes are normatively defined in W3C XML Schema 1.0 Part 2, Section 3.2.7-14. The table below defines the mapping between XML Schema 1.0 date/time datatype fields and this class' fields. It also summarizes the value constraints for the date and time fields defined in W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats .
All maximum value space constraints listed for the fields in the table above are checked by factory methods, @{link DatatypeFactory}, setter methods and parse methods of this class. IllegalArgumentException is thrown when a parameter's value is outside the value constraint for the field or if the composite values constitute an invalid XMLGregorianCalendar instance (for example, if the 31st of June is specified). The following operations are defined for this class:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
Representation for W3C XML Schema 1.0 date/time datatypes.
Specifically, these date/time datatypes are
The table below defines the mapping between XML Schema 1.0 date/time datatype fields and this class' fields. It also summarizes the value constraints for the date and time fields defined in W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats.
All maximum value space constraints listed for the fields in the table
above are checked by factory methods, @{link DatatypeFactory},
setter methods and parse methods of
this class. The following operations are defined for this class:
|
Representation for W3C XML Schema 1.0 date/time datatypes.
Specifically, these date/time datatypes are
The table below defines the mapping between XML Schema 1.0 date/time datatype fields and this class' fields. It also summarizes the value constraints for the date and time fields defined in W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats.
All maximum value space constraints listed for the fields in the table
above are checked by factory methods, @{link DatatypeFactory},
setter methods and parse methods of
this class. The following operations are defined for this class:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
equalspublic boolean equals(java.lang.Object obj)
| |
equalspublic boolean equals(java.lang.Object obj)
|
equalspublic boolean equals(java.lang.Object obj)
|
Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
| |
Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
|
Defines a factory API that enables applications to obtain a parser that produces DOM object trees from XML documents.
|
getSchemapublic Schema getSchema()
| |
getSchemapublic Schema getSchema()
|
getSchemapublic Schema getSchema()
|
newInstancepublic static DocumentBuilderFactory newInstance(java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
|
setFeature
public abstract void setFeature(java.lang.String name,
boolean value)
throws ParserConfigurationException
| |
setFeature
public abstract void setFeature(java.lang.String name,
boolean value)
throws ParserConfigurationException
|
setFeature
public abstract void setFeature(java.lang.String name,
boolean value)
throws ParserConfigurationException
|
setSchemapublic void setSchema(Schema schema)
| |
setSchemapublic void setSchema(Schema schema)
|
setSchemapublic void setSchema(Schema schema)
|
Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
| |
Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
|
Defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
|
newInstancepublic static SAXParserFactory newInstance(java.lang.String factoryClassName, java.lang.ClassLoader classLoader)
|
This interface declares a simple filter interface that one can create to filter XMLEventReaders
|
acceptboolean accept(XMLEvent event)
|
An error class for reporting factory configuration errors.
|
FactoryConfigurationErrorpublic FactoryConfigurationError()
|
FactoryConfigurationErrorpublic FactoryConfigurationError(java.lang.Exception e)
|
FactoryConfigurationErrorpublic FactoryConfigurationError(java.lang.String msg)
|
getExceptionpublic java.lang.Exception getException()
|
getMessagepublic java.lang.String getMessage()
|
Provides information on the location of an event. All the information provided by a Location is optional. For example an application may only report line numbers.
|
getColumnNumberint getColumnNumber()
|
getLineNumberint getLineNumber()
|
getPublicIdjava.lang.String getPublicId()
|
getSystemIdjava.lang.String getSystemId()
|
This interface declares a simple filter interface that one can create to filter XMLStreamReaders
|
acceptboolean accept(XMLStreamReader reader)
|
This interface defines a utility class for creating instances of XMLEvents
|
XMLEventFactoryprotected XMLEventFactory() |
createAttributepublic abstract Attribute createAttribute(java.lang.String localName, java.lang.String value)
|
createAttributepublic abstract Attribute createAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
|
createAttributepublic abstract Attribute createAttribute(QName name, java.lang.String value)
|
createCDatapublic abstract Characters createCData(java.lang.String content)
|
createCharacterspublic abstract Characters createCharacters(java.lang.String content)
|
createCommentpublic abstract Comment createComment(java.lang.String text)
|
createDTDpublic abstract DTD createDTD(java.lang.String dtd)
|
createEndDocumentpublic abstract EndDocument createEndDocument()
|
createEndElementpublic abstract EndElement createEndElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName)
|
createEndElementpublic abstract EndElement createEndElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator namespaces)
|
createEndElementpublic abstract EndElement createEndElement(QName name, java.util.Iterator namespaces)
|
createEntityReferencepublic abstract EntityReference createEntityReference(java.lang.String name, EntityDeclaration declaration)
|
createIgnorableSpacepublic abstract Characters createIgnorableSpace(java.lang.String content)
|
createNamespacepublic abstract Namespace createNamespace(java.lang.String namespaceURI)
|
createNamespacepublic abstract Namespace createNamespace(java.lang.String prefix, java.lang.String namespaceUri)
|
createProcessingInstructionpublic abstract ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
|
createSpacepublic abstract Characters createSpace(java.lang.String content)
|
createStartDocumentpublic abstract StartDocument createStartDocument()
|
createStartDocumentpublic abstract StartDocument createStartDocument(java.lang.String encoding)
|
createStartDocumentpublic abstract StartDocument createStartDocument(java.lang.String encoding, java.lang.String version)
|
createStartDocumentpublic abstract StartDocument createStartDocument(java.lang.String encoding, java.lang.String version, boolean standalone)
|
createStartElementpublic abstract StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName)
|
createStartElementpublic abstract StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator attributes, java.util.Iterator namespaces)
|
createStartElementpublic abstract StartElement createStartElement(java.lang.String prefix, java.lang.String namespaceUri, java.lang.String localName, java.util.Iterator attributes, java.util.Iterator namespaces, NamespaceContext context)
|
createStartElementpublic abstract StartElement createStartElement(QName name, java.util.Iterator attributes, java.util.Iterator namespaces)
|
newInstancepublic static XMLEventFactory newInstance() throws FactoryConfigurationError
|
newInstancepublic static XMLEventFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
|
setLocationpublic abstract void setLocation(Location location)
|
This is the top level interface for parsing XML Events. It provides the ability to peek at the next event and returns configuration information through the property interface.
|
close
void close()
throws XMLStreamException
|
getElementText
java.lang.String getElementText()
throws XMLStreamException
|
nextEventXMLEvent nextEvent() throws XMLStreamException
|
nextTagXMLEvent nextTag() throws XMLStreamException
|
peekXMLEvent peek() throws XMLStreamException
|
This is the top level interface for writing XML documents. Instances of this interface are not required to validate the form of the XML.
|
addvoid add(XMLEventReader reader) throws XMLStreamException
|
addvoid add(XMLEvent event) throws XMLStreamException
| ||||||||||||||||||||||||||||||||||||||||||
close
void close()
throws XMLStreamException
|
flush
void flush()
throws XMLStreamException
|
getNamespaceContextNamespaceContext getNamespaceContext()
|
getPrefix
java.lang.String getPrefix(java.lang.String uri)
throws XMLStreamException
|
setDefaultNamespace
void setDefaultNamespace(java.lang.String uri)
throws XMLStreamException
|
setNamespaceContextvoid setNamespaceContext(NamespaceContext context) throws XMLStreamException
|
setPrefix
void setPrefix(java.lang.String prefix,
java.lang.String uri)
throws XMLStreamException
|
Defines an abstract implementation of a factory for getting streams. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
XMLInputFactoryprotected XMLInputFactory() |
ALLOCATORpublic static final java.lang.String ALLOCATOR
|
IS_COALESCINGpublic static final java.lang.String IS_COALESCING
|
IS_NAMESPACE_AWAREpublic static final java.lang.String IS_NAMESPACE_AWARE
|
IS_REPLACING_ENTITY_REFERENCESpublic static final java.lang.String IS_REPLACING_ENTITY_REFERENCES
|
IS_SUPPORTING_EXTERNAL_ENTITIESpublic static final java.lang.String IS_SUPPORTING_EXTERNAL_ENTITIES
|
IS_VALIDATINGpublic static final java.lang.String IS_VALIDATING
|
REPORTERpublic static final java.lang.String REPORTER
|
RESOLVERpublic static final java.lang.String RESOLVER
|
SUPPORT_DTDpublic static final java.lang.String SUPPORT_DTD
|
createFilteredReaderpublic abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException
|
createFilteredReaderpublic abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException
|
createXMLEventReaderpublic abstract XMLEventReader createXMLEventReader(Source source) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, java.lang.String encoding) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.InputStream stream) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(java.lang.String systemId, java.io.Reader reader) throws XMLStreamException
|
createXMLStreamReaderpublic abstract XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException
|
getEventAllocatorpublic abstract XMLEventAllocator getEventAllocator()
|
getXMLReporterpublic abstract XMLReporter getXMLReporter()
|
getXMLResolverpublic abstract XMLResolver getXMLResolver()
|
newInstancepublic static XMLInputFactory newInstance() throws FactoryConfigurationError
|
newInstancepublic static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
|
setEventAllocatorpublic abstract void setEventAllocator(XMLEventAllocator allocator)
|
setXMLReporterpublic abstract void setXMLReporter(XMLReporter reporter)
|
setXMLResolverpublic abstract void setXMLResolver(XMLResolver resolver)
|
Defines an abstract implementation of a factory for getting XMLEventWriters and XMLStreamWriters. The following table defines the standard properties of this specification. Each property varies in the level of support required by each implementation. The level of support required is described in the 'Required' column.
The following paragraphs describe the namespace and prefix repair algorithm: The property can be set with the following code line:
This property specifies that the writer default namespace prefix declarations. The default value is false. If a writer isRepairingNamespaces it will create a namespace declaration on the current StartElement for any attribute that does not currently have a namespace declaration in scope. If the StartElement has a uri but no prefix specified a prefix will be assigned, if the prefix has not been declared in a parent of the current StartElement it will be declared on the current StartElement. If the defaultNamespace is bound and in scope and the default namespace matches the URI of the attribute or StartElement QName no prefix will be assigned. If an element or attribute name has a prefix, but is not bound to any namespace URI, then the prefix will be removed during serialization. If element and/or attribute names in the same start or empty-element tag are bound to different namespace URIs and are using the same prefix then the element or the first occurring attribute retains the original prefix and the following attributes have their prefixes replaced with a new prefix that is bound to the namespace URIs of those attributes. If an element or attribute name uses a prefix that is bound to a different URI than that inherited from the namespace context of the parent of that element and there is no namespace declaration in the context of the current element then such a namespace declaration is added. If an element or attribute name is bound to a prefix and there is a namespace declaration that binds that prefix to a different URI then that namespace declaration is either removed if the correct mapping is inherited from the parent context of that element, or changed to the namespace URI of the element or attribute using that prefix.
| ||||||||||||
XMLOutputFactoryprotected XMLOutputFactory() |
IS_REPAIRING_NAMESPACESpublic static final java.lang.String IS_REPAIRING_NAMESPACES
|
createXMLEventWriterpublic abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream) throws XMLStreamException
|
createXMLEventWriterpublic abstract XMLEventWriter createXMLEventWriter(java.io.OutputStream stream, java.lang.String encoding) throws XMLStreamException
|
createXMLEventWriterpublic abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException
|
createXMLEventWriterpublic abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException
|
createXMLStreamWriterpublic abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream) throws XMLStreamException
|
createXMLStreamWriterpublic abstract XMLStreamWriter createXMLStreamWriter(java.io.OutputStream stream, java.lang.String encoding) throws XMLStreamException
|
createXMLStreamWriterpublic abstract XMLStreamWriter createXMLStreamWriter(java.io.Writer stream) throws XMLStreamException
|
createXMLStreamWriterpublic abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException
|
newInstancepublic static XMLOutputFactory newInstance() throws FactoryConfigurationError
|
newInstancepublic static XMLInputFactory newInstance(java.lang.String factoryId, java.lang.ClassLoader classLoader) throws FactoryConfigurationError
|
This interface is used to report non-fatal errors. Only warnings should be echoed through this interface.
|
report
void report(java.lang.String message,
java.lang.String errorType,
java.lang.Object relatedInformation,
Location location)
throws XMLStreamException
|
This interface is used to resolve resources during an XML parse. If an application wishes to perform custom entity resolution it must register an instance of this interface with the XMLInputFactory using the setXMLResolver method.
|
resolveEntity
java.lang.Object resolveEntity(java.lang.String publicID,
java.lang.String systemID,
java.lang.String baseURI,
java.lang.String namespace)
throws XMLStreamException
|
This interface declares the constants used in this API. Numbers in the range 0 to 256 are reserved for the specification, user defined events must use event codes outside that range.
|
ATTRIBUTEstatic final int ATTRIBUTE
|
CDATAstatic final int CDATA
|
CHARACTERSstatic final int CHARACTERS
|
COMMENTstatic final int COMMENT
|
DTDstatic final int DTD
|
END_DOCUMENTstatic final int END_DOCUMENT
|
END_ELEMENTstatic final int END_ELEMENT
|
ENTITY_DECLARATIONstatic final int ENTITY_DECLARATION
|
ENTITY_REFERENCEstatic final int ENTITY_REFERENCE
|
NAMESPACEstatic final int NAMESPACE
|
NOTATION_DECLARATIONstatic final int NOTATION_DECLARATION
|
PROCESSING_INSTRUCTIONstatic final int PROCESSING_INSTRUCTION
|
SPACEstatic final int SPACE
|
START_DOCUMENTstatic final int START_DOCUMENT
|
START_ELEMENTstatic final int START_ELEMENT
|
The base exception for unexpected processing errors. This Exception class is used to report well-formedness errors as well as unexpected processing conditions.
|
XMLStreamExceptionpublic XMLStreamException()
|
XMLStreamExceptionpublic XMLStreamException(java.lang.String msg)
|
XMLStreamException
public XMLStreamException(java.lang.String msg,
Location location)
|
XMLStreamException
public XMLStreamException(java.lang.String msg,
Location location,
java.lang.Throwable th)
|
XMLStreamExceptionpublic XMLStreamException(java.lang.Throwable th)
|
locationprotected Location location |
nestedprotected java.lang.Throwable nested |
getLocationpublic Location getLocation()
|
getNestedExceptionpublic java.lang.Throwable getNestedException()
|
The XMLStreamReader interface allows forward, read-only access to XML. It is designed to be the lowest level and most efficient way to read XML data. The XMLStreamReader is designed to iterate over XML using next() and hasNext(). The data can be accessed using methods such as getEventType(), getNamespaceURI(), getLocalName() and getText(); The next() method causes the reader to read the next parse event. The next() method returns an integer which identifies the type of event just read. The event type can be determined using getEventType(). Parsing events are defined as the XML Declaration, a DTD, start tag, character data, white space, end tag, comment, or processing instruction. An attribute or namespace event may be encountered at the root level of a document as the result of a query operation. For XML 1.0 compliance an XML processor must pass the
identifiers of declared unparsed entities, notation declarations and their
associated identifiers to the application. This information is
provided through the property API on this interface.
The following two properties allow access to this information:
javax.xml.stream.notations and javax.xml.stream.entities.
When the current event is a DTD the following call will return a
list of Notations
The following table describes which methods are valid in what state. If a method is called in an invalid state the method will throw a java.lang.IllegalStateException.
| ||||||||||||||||||||||||||||||||
close
void close()
throws XMLStreamException
|
getAttributeNameQName getAttributeName(int index)
|
getElementText
java.lang.String getElementText()
throws XMLStreamException
|
getEncodingjava.lang.String getEncoding()
|
getEventTypeint getEventType()
|
getLocationLocation getLocation()
|
getNameQName getName()
|
getNamespaceContextNamespaceContext getNamespaceContext()
|
getNamespaceURIjava.lang.String getNamespaceURI(java.lang.String prefix)
|
getPIDatajava.lang.String getPIData()
|
getPITargetjava.lang.String getPITarget()
|
getPrefixjava.lang.String getPrefix()
|
getTextCharacters
int getTextCharacters(int sourceStart,
char[] target,
int targetStart,
int length)
throws XMLStreamException
|
getVersionjava.lang.String getVersion()
|
hasNameboolean hasName()
|
hasNext
boolean hasNext()
throws XMLStreamException
|
hasTextboolean hasText()
|
isCharactersboolean isCharacters()
|
isEndElementboolean isEndElement()
|
isStandaloneboolean isStandalone()
|
isStartElementboolean isStartElement()
|
isWhiteSpaceboolean isWhiteSpace()
|
next
int next()
throws XMLStreamException
|
nextTag
int nextTag()
throws XMLStreamException
|
require
void require(int type,
java.lang.String namespaceURI,
java.lang.String localName)
throws XMLStreamException
|
standaloneSetboolean standaloneSet()
|
The XMLStreamWriter interface specifies how to write XML. The XMLStreamWriter does not perform well formedness checking on its input. However the writeCharacters method is required to escape & , < and > For attribute values the writeAttribute method will escape the above characters plus " to ensure that all character content and attribute values are well formed. Each NAMESPACE and ATTRIBUTE must be individually written. If javax.xml.stream.isPrefixDefaulting is set to false it is a fatal error if an element is written with namespace URI that has not been bound to a prefix. If javax.xml.stream.isPrefixDefaulting is set to true the XMLStreamWriter implementation must write a prefix for each unbound URI that it encounters in the current scope.
|
close
void close()
throws XMLStreamException
|
flush
void flush()
throws XMLStreamException
|
getNamespaceContextNamespaceContext getNamespaceContext()
|
getPrefix
java.lang.String getPrefix(java.lang.String uri)
throws XMLStreamException
|
setDefaultNamespace
void setDefaultNamespace(java.lang.String uri)
throws XMLStreamException
|
setNamespaceContextvoid setNamespaceContext(NamespaceContext context) throws XMLStreamException
|
setPrefix
void setPrefix(java.lang.String prefix,
java.lang.String uri)
throws XMLStreamException
|
writeAttribute
void writeAttribute(java.lang.String localName,
java.lang.String value)
throws XMLStreamException
|
writeAttribute
void writeAttribute(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
throws XMLStreamException
|
writeAttribute
void writeAttribute(java.lang.String prefix,
java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String value)
throws XMLStreamException
|
writeCData
void writeCData(java.lang.String data)
throws XMLStreamException
|
writeCharacters
void writeCharacters(char[] text,
int start,
int len)
throws XMLStreamException
|
writeCharacters
void writeCharacters(java.lang.String text)
throws XMLStreamException
|
writeComment
void writeComment(java.lang.String data)
throws XMLStreamException
|
writeDTD
void writeDTD(java.lang.String dtd)
throws XMLStreamException
|
writeDefaultNamespace
void writeDefaultNamespace(java.lang.String namespaceURI)
throws XMLStreamException
|
writeEmptyElement
void writeEmptyElement(java.lang.String localName)
throws XMLStreamException
|
writeEmptyElement
void writeEmptyElement(java.lang.String namespaceURI,
java.lang.String localName)
throws XMLStreamException
|
writeEmptyElement
void writeEmptyElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
throws XMLStreamException
|
writeEndDocument
void writeEndDocument()
throws XMLStreamException
|
writeEndElement
void writeEndElement()
throws XMLStreamException
|
writeEntityRef
void writeEntityRef(java.lang.String name)
throws XMLStreamException
|
writeNamespace
void writeNamespace(java.lang.String prefix,
java.lang.String namespaceURI)
throws XMLStreamException
|
writeProcessingInstruction
void writeProcessingInstruction(java.lang.String target)
throws XMLStreamException
|
writeProcessingInstruction
void writeProcessingInstruction(java.lang.String target,
java.lang.String data)
throws XMLStreamException
|
writeStartDocument
void writeStartDocument()
throws XMLStreamException
|
writeStartDocument
void writeStartDocument(java.lang.String version)
throws XMLStreamException
|
writeStartDocument
void writeStartDocument(java.lang.String encoding,
java.lang.String version)
throws XMLStreamException
|
writeStartElement
void writeStartElement(java.lang.String localName)
throws XMLStreamException
|
writeStartElement
void writeStartElement(java.lang.String namespaceURI,
java.lang.String localName)
throws XMLStreamException
|
writeStartElement
void writeStartElement(java.lang.String prefix,
java.lang.String localName,
java.lang.String namespaceURI)
throws XMLStreamException
|
An interface that contains information about an attribute. Attributes are reported as a set of events accessible from a StartElement. Other applications may report Attributes as first-order events, for example as the results of an XPath expression.
|
getDTDTypejava.lang.String getDTDType()
|
getNameQName getName()
|
getValuejava.lang.String getValue()
|
This describes the interface to Characters events. All text events get reported as Characters events. Content, CData and whitespace are all reported as Characters events. IgnorableWhitespace, in most cases, will be set to false unless an element declaration of element content is present for the current element.
|
getDatajava.lang.String getData()
|
isIgnorableWhiteSpaceboolean isIgnorableWhiteSpace()
|
An interface for comment events
|
getTextjava.lang.String getText()
|
This is the top level interface for events dealing with DTDs
|
getEntitiesjava.util.List getEntities()
|
getNotationsjava.util.List getNotations()
|
getProcessedDTDjava.lang.Object getProcessedDTD()
|
A marker interface for the end of the document
|
An interface for the end element event. An EndElement is reported for each End Tag in the document.
|
getNameQName getName()
|
An interface for handling Entity Declarations This interface is used to record and report unparsed entity declarations.
|
getBaseURIjava.lang.String getBaseURI()
|
getNamejava.lang.String getName()
|
getNotationNamejava.lang.String getNotationName()
|
getPublicIdjava.lang.String getPublicId()
|
getReplacementTextjava.lang.String getReplacementText()
|
getSystemIdjava.lang.String getSystemId()
|
An interface for handling Entity events. This event reports entities that have not been resolved and reports their replacement text unprocessed (if available). This event will be reported if javax.xml.stream.isReplacingEntityReferences is set to false. If javax.xml.stream.isReplacingEntityReferences is set to true entity references will be resolved transparently. Entities are handled in two possible ways: (1) If javax.xml.stream.isReplacingEntityReferences is set to true all entity references are resolved and reported as markup transparently. (2) If javax.xml.stream.isReplacingEntityReferences is set to false Entity references are reported as an EntityReference Event.
|
getDeclarationEntityDeclaration getDeclaration()
|
getNamejava.lang.String getName()
|
An interface that contains information about a namespace. Namespaces are accessed from a StartElement.
|
getNamespaceURIjava.lang.String getNamespaceURI()
|
getPrefixjava.lang.String getPrefix()
|
isDefaultNamespaceDeclarationboolean isDefaultNamespaceDeclaration()
|
An interface for handling Notation Declarations Receive notification of a notation declaration event. It is up to the application to record the notation for later reference, At least one of publicId and systemId must be non-null. There is no guarantee that the notation declaration will be reported before any unparsed entities that use it.
|
getNamejava.lang.String getName()
|
getPublicIdjava.lang.String getPublicId()
|
getSystemIdjava.lang.String getSystemId()
|
An interface that describes the data found in processing instructions
|
getDatajava.lang.String getData()
|
getTargetjava.lang.String getTarget()
|
An interface for the start document event
|
encodingSetboolean encodingSet()
|
getCharacterEncodingSchemejava.lang.String getCharacterEncodingScheme()
|
getSystemIdjava.lang.String getSystemId()
|
getVersionjava.lang.String getVersion()
|
isStandaloneboolean isStandalone()
|
standaloneSetboolean standaloneSet()
|
The StartElement interface provides access to information about start elements. A StartElement is reported for each Start Tag in the document.
|
getAttributeByNameAttribute getAttributeByName(QName name)
|
getNameQName getName()
|
getNamespaceContextNamespaceContext getNamespaceContext()
|
This is the base event interface for handling markup events. Events are value objects that are used to communicate the XML 1.0 InfoSet to the Application. Events may be cached and referenced after the parse has completed.
|
asCharactersCharacters asCharacters()
|
asEndElementEndElement asEndElement()
|
asStartElementStartElement asStartElement()
|
getEventTypeint getEventType()
|
getLocationLocation getLocation()
|
getSchemaTypeQName getSchemaType()
|
isAttributeboolean isAttribute()
|
isCharactersboolean isCharacters()
|
isEndDocumentboolean isEndDocument()
|
isEndElementboolean isEndElement()
|
isEntityReferenceboolean isEntityReference()
|
isNamespaceboolean isNamespace()
|
isProcessingInstructionboolean isProcessingInstruction()
|
isStartDocumentboolean isStartDocument()
|
isStartElementboolean isStartElement()
|
writeAsEncodedUnicode
void writeAsEncodedUnicode(java.io.Writer writer)
throws XMLStreamException
|
This is the base class for deriving an XMLEventReader filter. This class is designed to sit between an XMLEventReader and an application's XMLEventReader. By default each method does nothing but call the corresponding method on the parent interface.
|
EventReaderDelegatepublic EventReaderDelegate()
|
EventReaderDelegatepublic EventReaderDelegate(XMLEventReader reader)
|
close
public void close()
throws XMLStreamException
|
getElementText
public java.lang.String getElementText()
throws XMLStreamException
|
getParentpublic XMLEventReader getParent()
|
getProperty
public java.lang.Object getProperty(java.lang.String name)
throws java.lang.IllegalArgumentException
|
hasNextpublic boolean hasNext()
|
nextpublic java.lang.Object next()
|
nextEventpublic XMLEvent nextEvent() throws XMLStreamException
|
nextTagpublic XMLEvent nextTag() throws XMLStreamException
|
peekpublic XMLEvent peek() throws XMLStreamException
|
removepublic void remove()
|
setParentpublic void setParent(XMLEventReader reader)
|
This is the base class for deriving an XMLStreamReader filter This class is designed to sit between an XMLStreamReader and an application's XMLStreamReader. By default each method does nothing but call the corresponding method on the parent interface.
|
StreamReaderDelegatepublic StreamReaderDelegate()
|
StreamReaderDelegatepublic StreamReaderDelegate(XMLStreamReader reader)
|
close
public void close()
throws XMLStreamException
|