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.
OpenLayers. | 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. |
name | {String} The name of this parser, this is the part of the CLASS_NAME except for “OpenLayers.Format.” |
stringifyOutput | {Boolean} If true, write will return a string otherwise a DOMElement. |
parser | {Object} Instance of the versioned parser. |
Constructor | |
OpenLayers. | Constructor. |
Functions | |
getVersion | Returns the version to use. |
getParser | Get an instance of the cached parser if available, otherwise create one. |
write | Write a document. |
read | Read a doc and return an object representing the document. |
Returns the version to use.
getVersion: function( root, options )
Get an instance of the cached parser if available, otherwise create one.
getParser: function( version )
Write a document.
write: function( obj, options )
Read a doc and return an object representing the document.
read: function( data, options )