Package org.apache.xmlbeans
Provides classes for XML Beans schema, infoset, xpath, and xquery handling.
The XML Beans API is designed to work with the XML Beans schema compiler. The schema compiler produces XML Bean classes that extend and interact with the basic XML Bean classes and interfaces in this package. It is also possible to use XML Beans without the schema compiler to manipulate and validate XML in a late-bound way (with no types, or with runtime-loaded types only).
This package contains:
- All the built-in XML Bean classes
such as
XmlObject
,XmlAnySimpleType
, andXmlInt
(one for each of the 46 built-in XML Schema types). - Support for full XML infoset, XPath, and XQuery
(via
XmlCursor
,XmlObject.selectPath(java.lang.String)
and related methods). - Support for computation using XML Schema data types (via datatype
classes such as
GDuration
). - Support for working with XML Schema type metadata itself
(via
SchemaType
,SchemaTypeSystem
, and related classes).
The place to begin when working with the XML Beans API is the following fundamental classes:
XmlObject
is the base class for all XML Beans.org.apache.xmlbeans.XmlObject.Factory
is used to load and create XML Bean instances. Each XML Bean class has its own nested factory class.XmlCursor
is an efficient treewalking API for the full XML infoset.SchemaType
is the type metadata interface for XML Schema typesXmlBeans
provides a collection of utility functions.
-
Interface Summary Interface Description DelegateXmlObject SeeFilterXmlObject
Filer GDateSpecification Represents an XML Schema-compatible Gregorian date.GDurationSpecification Represents an XML Schema-compatible duration.InterfaceExtension InterfaceExtension.MethodSignature ObjectFactory generic interface to abstract creation of an objectPrePostExtension QNameSetSpecification Represents a lattice of finite and infinite sets of QNames.ResourceLoader SchemaAnnotated Marker interface denoting that an annotation can be presentSchemaAnnotation Represents a Schema annotation.SchemaAnnotation.Attribute Represents an attribute instanceSchemaAttributeGroup Represents an attribute group.SchemaAttributeModel Represents the attribute structure allowed on a complex type.SchemaCodePrinter This class is used to provide alternate implementations of the schema Java code generation.SchemaComponent Represents a global Schema Component.SchemaField Represents an element or an attribute declaration.SchemaGlobalAttribute Represents a global attribute definitionSchemaGlobalElement Represents a global element definition.SchemaIdentityConstraint Represents an identity constraint definition.SchemaLocalAttribute Represents a local or global attribute definition.SchemaLocalElement Represents a local or global element definition.SchemaModelGroup Represents a model group.SchemaParticle Represents a Schema particle definition.SchemaProperty Represents a summary of similar SchemaFields in a complex type.SchemaStringEnumEntry Describes a code-generated string enumerationSchemaType Represents a schema type.SchemaTypeElementSequencer This class is used to programatically validate the contents of an XML element.Call to bothSchemaTypeElementSequencer.next(javax.xml.namespace.QName)
andSchemaTypeElementSequencer.peek(javax.xml.namespace.QName)
will return true if the element with the provided name is allowed at the current position in the element content, the difference being thatSchemaTypeElementSequencer.next(javax.xml.namespace.QName)
will advance the current position, whileSchemaTypeElementSequencer.peek(javax.xml.namespace.QName)
won't.SchemaTypeLoader Represents a searchable set of XML Schema component definitions.SchemaTypeSystem A finite set of XML Schema component definitions.SimpleValue All XmlObject implementations can be coerced to SimpleValue.UserType The UserType class represents a mapping between an XML Schema QName and a custom Java class type.XmlAnySimpleType Corresponds to the XML Schema xs:anySimpleType type.XmlAnyURI Corresponds to the XML Schema xs:anyURI type.XmlBase64Binary Corresponds to the XML Schema xs:base64Binary type.XmlBoolean Corresponds to the XML Schema xs:boolean type.XmlByte Corresponds to the XML Schema xs:byte type.XmlCursor Represents a position between two logical tokens in an XML document.XmlCursor.ChangeStamp Represents the state of a dcoument at a particular point in time.XmlCursor.XmlMark An abstractXmlCursor
factory.XmlDate Corresponds to the XML Schema xs:date type.XmlDateTime Corresponds to the XML Schema xs:dateTime type.XmlDecimal Corresponds to the XML Schema xs:decimal type.XmlDouble Corresponds to the XML Schema xs:double type.XmlDuration Corresponds to the XML Schema xs:duration type.XmlENTITIES Corresponds to the XML Schema xs:ENTITIES type, a list type.XmlENTITY Corresponds to the XML Schema xs:ENTITY type.XmlFactoryHook A hook for the XML Bean Factory mechanism.XmlFloat Corresponds to the XML Schema xs:float type.XmlGDay Corresponds to the XML Schema xs:gDay type.XmlGMonth Corresponds to the XML Schema xs:gMonth type.XmlGMonthDay Corresponds to the XML Schema xs:gMonthDay type.XmlGYear Corresponds to the XML Schema xs:gYear type.XmlGYearMonth Corresponds to the XML Schema xs:gYearMonth type.XmlHexBinary Corresponds to the XML Schema xs:hexBinary type.XmlID Corresponds to the XML Schema xs:ID type.XmlIDREF Corresponds to the XML Schema xs:IDREF type.XmlIDREFS Corresponds to the XML Schema xs:IDREFS type, a list type.XmlInt Corresponds to the XML Schema xs:int type.XmlInteger Corresponds to the XML Schema xs:integer type.XmlLanguage Corresponds to the XML Schema xs:language type.XmlLong Corresponds to the XML Schema xs:long type.XmlName Corresponds to the XML Schema xs:Name type.XmlNCName Corresponds to the XML Schema xs:Name type.XmlNegativeInteger Corresponds to the XML Schema xs:negativeInteger type.XmlNMTOKEN Corresponds to the XML Schema xs:NMTOKEN type.XmlNMTOKENS Corresponds to the XML Schema xs:NMTOKENS type, a list type.XmlNonNegativeInteger Corresponds to the XML Schema xs:nonNegativeInteger type.XmlNonPositiveInteger Corresponds to the XML Schema xs:nonPositiveInteger type.XmlNormalizedString Corresponds to the XML Schema xs:normalizedString type.XmlNOTATION Corresponds to the XML Schema xs:NOTATION type.XmlObject Corresponds to the XML Schema xs:anyType, the base type for all XML Beans.XmlPositiveInteger Corresponds to the XML Schema xs:positiveInteger type.XmlQName Corresponds to the XML Schema xs:QName type.XmlSaxHandler A holder for a SAXContentHandler
andLexicalHandler
that are capable of loading anXmlObject
instance.XmlShort Corresponds to the XML Schema xs:short type.XmlString Corresponds to the XML Schema xs:string type.XmlTime Corresponds to the XML Schema xs:time type.XmlToken Corresponds to the XML Schema xs:token type.XmlTokenSource XmlUnsignedByte Corresponds to the XML Schema xs:unsignedByte type.XmlUnsignedInt Corresponds to the XML Schema xs:unsignedInt type.XmlUnsignedLong Corresponds to the XML Schema xs:unsignedLong type.XmlUnsignedShort Corresponds to the XML Schema xs:unsignedShort type. -
Class Summary Class Description BindingConfig The BindingConfig class is used during compilation to control the generation of java source files.CDataBookmark Represents a CDATA bookmark.FilterXmlObject A FilterXmlObject delegates to some other XmlObject, which it can use as its basic source of data, possibly transforming the data along the way or providing additional functionality.GDate Represents an XML Schema-compatible Gregorian date.GDateBuilder Used to buildGDates
.GDuration Represents an XML Schema-compatible duration.GDurationBuilder Used to buildGDurations
.QNameCache A cache that can be used to pool QName instances.QNameSet This interface represents a lattice of finite and infinite sets of QNames.QNameSetBuilder Used to buildQNameSets
.SchemaAttributeGroup.Ref Used to allow on-demand loading of attribute groups.SchemaBookmark Represents a Schema bookmark.SchemaComponent.Ref A lazy reference to a component.SchemaGlobalAttribute.Ref Used to allow on-demand loading of elements.SchemaGlobalElement.Ref Used to allow on-demand loading of elements.SchemaIdentityConstraint.Ref Used to allow on-demand loading of identity constraints.SchemaModelGroup.Ref Used to allow on-demand loading of model groups.SchemaType.Ref Used to allow on-demand loading of types.StringEnumAbstractBase The base class for code-generated string enumeration value classes.StringEnumAbstractBase.Table Used to manage singleton instances of enumerations.SystemProperties ThreadLocalUtil XmlBase64Binary.Factory A class with methods for creating instances ofXmlBase64Binary
.XmlBeans Provides an assortment of utilities for managing XML Bean types, type systems, QNames, paths, and queries.XmlCalendar An XML Schema compatible subclass ofGregorianCalendar
.XmlCursor.TokenType An enumeration that identifies the type of an XML token.XmlCursor.XmlBookmark Subclasses of XmlBookmark can be used to annotate an XML document.XmlDocumentProperties This class is used to attach arbitrary information to an XML document.XmlError Represents a message at a specific XML location.XmlErrorCodes XmlFactoryHook.ThreadContext Used to manage the XmlFactoryHook for the current thread.XmlLineNumber A subclass of XmlBookmark that holds line number information.XmlOptionCharEscapeMap Corresponds to the Saver and XmlOptions.XmlOptions Used to supply options for loading, saving, and compiling, and validating.XmlSimpleList<T> The immutableList
returned for XML simple list values.XmlValidationError The XmlValidationError class extends theXmlError
XMLError class. -
Enum Summary Enum Description XmlOptions.BeanMethod XmlOptions.XmlOptionsKeys -
Exception Summary Exception Description SchemaTypeLoaderException An exception that is thrown if there is corruption or a version mismatch in a compiled schema type system.XmlException A checked exception that can be thrown while processing, parsing, or compiling XML.XmlRuntimeException An unchecked XML exception.