53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 #define GAIA_XML_START 0x00
67 #define GAIA_XML_END 0xDD
69 #define GAIA_XML_HEADER 0xAC
71 #define GAIA_XML_LEGACY_HEADER 0xAB
73 #define GAIA_XML_SCHEMA 0xBA
75 #define GAIA_XML_FILEID 0xCA
77 #define GAIA_XML_PARENTID 0xDA
79 #define GAIA_XML_NAME 0xDE
81 #define GAIA_XML_TITLE 0xDB
83 #define GAIA_XML_ABSTRACT 0xDC
85 #define GAIA_XML_GEOMETRY 0xDD
87 #define GAIA_XML_CRC32 0xBC
89 #define GAIA_XML_PAYLOAD 0xCB
94 #define GAIA_XML_LITTLE_ENDIAN 0x01
96 #define GAIA_XML_COMPRESSED 0x02
98 #define GAIA_XML_VALIDATED 0x04
100 #define GAIA_XML_ISO_METADATA 0x80
102 #define GAIA_XML_SLD_SE_RASTER_STYLE 0x10
104 #define GAIA_XML_SLD_SE_VECTOR_STYLE 0x40
106 #define GAIA_XML_SLD_STYLE 0x48
108 #define GAIA_XML_SVG 0x20
113 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
114 #ifdef ENABLE_LIBXML2
153 const unsigned char *xml,
int xml_len,
154 int compressed,
const char *schemaURI,
155 unsigned char **result,
int *size,
156 char **parsing_errors,
157 char **schema_validation_errors);
181 int size,
int indent);
206 int size,
int indent,
207 unsigned char **result,
340 int in_size,
int compressed,
341 unsigned char **result,
406 const unsigned char *xml,
461 const unsigned char *blob,
462 int size,
const char *identifier,
463 unsigned char **new_blob,
484 const unsigned char *blob,
486 const char *identifier,
487 unsigned char **new_blob,
512 const unsigned char *blob,
513 int size,
const char *identifier,
516 const char *ns_charstr,
517 const char *uri_charstr,
518 unsigned char **new_blob,
543 const unsigned char *blob,
545 const char *identifier,
548 const char *ns_charstr,
549 const char *uri_charstr,
550 unsigned char **new_blob,
625 unsigned char **blob_geom,
687 const char *xpath_expr);
721 GAIAGEO_DECLARE
int gaiaXmlLoad (
const void *p_cache,
722 const char *path_or_url,
723 unsigned char **result,
int *size,
724 char **parsing_errors);
751 GAIAGEO_DECLARE
int gaiaXmlStore (
const unsigned char *blob,
int size,
752 const char *path,
int indent);
GAIAGEO_DECLARE void gaiaXmlBlobCompression(const unsigned char *blob, int in_size, int compressed, unsigned char **result, int *out_size)
Return another XmlBLOB buffer compressed / uncompressed.
GAIAGEO_DECLARE int gaiaIsSldSeVectorStyleXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not.
GAIAGEO_DECLARE int gaiaIsSvgXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer does contain an SVG Symbol or not.
GAIAGEO_DECLARE int gaiaIsIsoMetadataXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer does contain an ISO Metadata or not.
GAIAGEO_DECLARE char * gaiaXmlGetInternalSchemaURI(const void *p_cache, const unsigned char *xml, int xml_len)
Return the Internal SchemaURI from a valid XmlDocument.
GAIAGEO_DECLARE char * gaia_libxml2_version(void)
return the LIBXML2 version string
GAIAGEO_DECLARE int gaiaIsSldStyleXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer does contain an SLD Style or not.
GAIAGEO_DECLARE char * gaiaXmlTextFromBlob(const unsigned char *blob, int size, int indent)
Extract an XMLDocument from within an XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaXmlBlobSetParentId(const void *p_cache, const unsigned char *blob, int size, const char *identifier, unsigned char **new_blob, int *new_size)
Return a new XmlBLOB (ISO Metadata) by replacing the ParentId value.
GAIAGEO_DECLARE int gaiaXmlLoad(const void *p_cache, const char *path_or_url, unsigned char **result, int *size, char **parsing_errors)
Load an external XML Document.
GAIAGEO_DECLARE int gaiaIsValidXmlBlob(const unsigned char *blob, int size)
Checks if a BLOB actually is a valid XmlBLOB buffer.
GAIAGEO_DECLARE void gaiaXmlBlobGetGeometry(const unsigned char *blob, int size, unsigned char **blob_geom, int *blob_size)
Return the Geometry Buffer from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlBlobGetLastParseError(const void *p_cache)
Return the most recent XML Parse error/warning (if any)
GAIAGEO_DECLARE char * gaiaXmlBlobGetName(const unsigned char *blob, int size)
Return the Name from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlBlobGetLastValidateError(const void *p_cache)
Return the most recent XML Validate error/warning (if any)
GAIAGEO_DECLARE int gaiaXmlBlobAddFileId(const void *p_cache, const unsigned char *blob, int size, const char *identifier, const char *ns_id, const char *uri_id, const char *ns_charstr, const char *uri_charstr, unsigned char **new_blob, int *new_size)
Return a new XmlBLOB (ISO Metadata) by inserting a FileId value.
GAIAGEO_DECLARE int gaiaXmlBlobAddParentId(const void *p_cache, const unsigned char *blob, int size, const char *identifier, const char *ns_id, const char *uri_id, const char *ns_charstr, const char *uri_charstr, unsigned char **new_blob, int *new_size)
Return a new XmlBLOB (ISO Metadata) by inserting a ParentId value.
GAIAGEO_DECLARE char * gaiaXmlBlobGetEncoding(const unsigned char *blob, int size)
Return the Charset Encoding from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlBlobGetTitle(const unsigned char *blob, int size)
Return the Title from a valid XmlBLOB buffer.
GAIAGEO_DECLARE void gaiaXmlToBlob(const void *p_cache, const unsigned char *xml, int xml_len, int compressed, const char *schemaURI, unsigned char **result, int *size, char **parsing_errors, char **schema_validation_errors)
Creates an XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaXmlStore(const unsigned char *blob, int size, const char *path, int indent)
Stores an external XML Document.
GAIAGEO_DECLARE char * gaiaXmlBlobGetSchemaURI(const unsigned char *blob, int size)
Return the SchemaURI from a valid XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaXmlBlobGetDocumentSize(const unsigned char *blob, int size)
Return the XMLDocument size (in bytes) from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlBlobGetParentId(const unsigned char *blob, int size)
Return the ParentIdentifier from a valid XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaIsValidXPathExpression(const void *p_cache, const char *xpath_expr)
Checks if a Text string could be a valid XPathExpression.
GAIAGEO_DECLARE int gaiaIsSldSeRasterStyleXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer does contain an SLD/SE Style or not.
GAIAGEO_DECLARE void gaiaXmlFromBlob(const unsigned char *blob, int size, int indent, unsigned char **result, int *res_size)
Extract an XMLDocument from within an XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaXmlBlobSetFileId(const void *p_cache, const unsigned char *blob, int size, const char *identifier, unsigned char **new_blob, int *new_size)
Return a new XmlBLOB (ISO Metadata) by replacing the FileId value.
GAIAGEO_DECLARE int gaiaIsSchemaValidatedXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema validation or not...
GAIAGEO_DECLARE char * gaiaXmlBlobGetAbstract(const unsigned char *blob, int size)
Return the Abstract from a valid XmlBLOB buffer.
GAIAGEO_DECLARE int gaiaIsCompressedXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer is compressed or not.
GAIAGEO_DECLARE char * gaiaXmlBlobGetFileId(const unsigned char *blob, int size)
Return the FileIdentifier from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlBlobGetLastXPathError(const void *p_cache)
Return the most recent XPath error/warning (if any)