OpenLayers. Format. XML. VersionedOGC

Base class for versioned formats, i.e. a format which supports multiple versions.

To enable checking if parsing succeeded, you will need to define a property called errorProperty on the parser you want to check.  The parser will then check the returned object to see if that property is present.  If it is, it assumes the parsing was successful.  If it is not present (or is null), it will pass the document through an OGCExceptionReport parser.

If errorProperty is undefined for the parser, this error checking mechanism will be disabled.

Inherits from

Summary
OpenLayers. Format. XML. VersionedOGC Base class for versioned formats, i.e.
Properties
defaultVersion {String} Version number to assume if none found.
version {String} Specify a version string if one is known.
profile {String} If provided, use a custom profile.
allowFallback {Boolean} If a profiled parser cannot be found for the returned version, use a non-profiled parser as the fallback.
stringifyOutput {Boolean} If true, write will return a string otherwise a DOMElement.
Constructor
OpenLayers. Format. XML. VersionedOGC. Constructor.
Functions
write Write a document.
read Read a doc and return an object representing the document.

Properties

defaultVersion

{String} Version number to assume if none found.

version

{String} Specify a version string if one is known.

profile

{String} If provided, use a custom profile.

allowFallback

{Boolean} If a profiled parser cannot be found for the returned version, use a non-profiled parser as the fallback.  Application code using this should take into account that the return object structure might be missing the specifics of the profile.  Defaults to false.

stringifyOutput

{Boolean} If true, write will return a string otherwise a DOMElement.  Default is false.

Constructor

OpenLayers. Format. XML. VersionedOGC.

Constructor.

Parameters

options {Object} Optional object whose properties will be set on the object.

Functions

write

write: function( obj,
options )

Write a document.

Parameters

obj {Object} An object representing the document.
options {Object} Optional configuration object.

Returns

{String} The document as a string

read

read: function( data,
options )

Read a doc and return an object representing the document.

Parameters

data {String | DOMElement} Data to read.
options {Object} Options for the reader.

Returns

{Object} An object representing the document.

write: function( obj,
options )
Write a document.
read: function( data,
options )
Read a doc and return an object representing the document.
Read and write XML.
Close