# Package org.apache.sis.xml

package org.apache.sis.xml
Provides methods for marshalling and unmarshalling SIS objects in XML. The XML format is compliant with ISO 19115-3 specification for metadata, and compliant with GML for referencing objects.

The main class in this package is `XML`, which provides property keys that can be used for configuring (un)marshallers and convenience static methods. For example the following code:

>     XML.marshal(Citations.OGC, System.out);

will produce a string like below:

>     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>     <cit:CI_Citation xmlns:gmd="http://www.isotc211.org/2005/gmd"
>                      xmlns:gco="http://www.isotc211.org/2005/gco">
>       <cit:title>
>         <gco:CharacterString>Open Geospatial Consortium</gco:CharacterString>
>       </cit:title>
>       ... much more XML below this point ...
>     </cit:CI_Citation>

## Customizing the XML

In order to parse and format ISO 19115-3 compliant documents, SIS needs its own `Marshaller` and `Unmarshaller` instances (which are actually wrappers around standard instances). Those instances are created and cached by `MarshallerPool`, which is used internally by the above-cited `XML` class. However developers can instantiate their own `MarshallerPool` in order to get more control on the marshalling and unmarshalling processes, including the namespace URLs and the errors handling.

The most common namespace URLs are defined in the `Namespaces` class. The parsing of some objects like `URL` and `UUID`, together with the behavior in case of parsing error, can be specified by the `ValueConverter` class.

Since:
  0.3

Defined in the `sis-metadata` module

- Class
  Description
  IdentifiedObject
  The interface for all SIS objects having identifiers.
  IdentifierMap
  A map view of some or all identifiers in an identified object.
  IdentifierSpace<T>
  Some identifier namespaces that are handled in a special way.
  MarshalContext
  Context of a marshalling or unmarshalling process.
  MarshallerPool
  Creates and configures `Marshaller` or `Unmarshaller` objects for use with SIS.
  Namespaces
  Lists some namespaces URLs used by JAXB when (un)marshalling.
  NilObject
  A marker interface for nil XML elements providing an explanation about why the information is absent.
  NilReason
  Explanation for a missing XML element.
  ReferenceResolver
  Controls the (un)marshaller behavior regarding the `xlink` or `uuidref` attributes.
  ValueConverter
  Performs conversions of XML element or attribute values encountered during XML (un)marshalling.
  XLink
  The XML attributes defined by OGC in the xlink schema.
  XLink.Actuate
  Communicates the desired timing of traversal from the starting resource to the ending resource.
  XLink.Show
  Communicates the desired presentation of the ending resource on traversal from the starting resource.
  XLink.Type
  The type of a `xlink`.
  XML
  Provides convenience methods for marshalling and unmarshalling SIS objects.