53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65 #define GAIA_XML_START 0x00
67 #define GAIA_XML_END 0xDD
69 #define GAIA_XML_HEADER 0xAB
71 #define GAIA_XML_SCHEMA 0xBA
73 #define GAIA_XML_FILEID 0xCA
75 #define GAIA_XML_PARENTID 0xDA
77 #define GAIA_XML_TITLE 0xDB
79 #define GAIA_XML_ABSTRACT 0xDC
81 #define GAIA_XML_GEOMETRY 0xDD
83 #define GAIA_XML_CRC32 0xBC
85 #define GAIA_XML_PAYLOAD 0xCB
90 #define GAIA_XML_LITTLE_ENDIAN 0x01
92 #define GAIA_XML_COMPRESSED 0x02
94 #define GAIA_XML_VALIDATED 0x04
96 #define GAIA_XML_ISO_METADATA 0x80
98 #define GAIA_XML_SLD_SE_RASTER_STYLE 0x10
100 #define GAIA_XML_SLD_SE_VECTOR_STYLE 0x40
102 #define GAIA_XML_SVG 0x20
107 #ifndef DOXYGEN_SHOULD_IGNORE_THIS
108 #ifdef ENABLE_LIBXML2
146 GAIAGEO_DECLARE
void gaiaXmlToBlob (
void *p_cache,
const unsigned char *xml,
147 int xml_len,
int compressed,
148 const char *schemaURI,
149 unsigned char **result,
int *size,
150 char **parsing_errors,
151 char **schema_validation_errors);
175 int size,
int indent);
200 int size,
int indent,
201 unsigned char **result,
310 int in_size,
int compressed,
311 unsigned char **result,
375 const unsigned char *xml,
431 const char *identifier,
432 unsigned char **new_blob,
453 const unsigned char *blob,
455 const char *identifier,
456 unsigned char **new_blob,
482 const char *identifier,
485 const char *ns_charstr,
486 const char *uri_charstr,
487 unsigned char **new_blob,
512 const unsigned char *blob,
514 const char *identifier,
517 const char *ns_charstr,
518 const char *uri_charstr,
519 unsigned char **new_blob,
576 unsigned char **blob_geom,
638 const char *xpath_expr);
672 GAIAGEO_DECLARE
int gaiaXmlLoad (
void *p_cache,
const char *path_or_url,
673 unsigned char **result,
int *size,
674 char **parsing_errors);
701 GAIAGEO_DECLARE
int gaiaXmlStore (
const unsigned char *blob,
int size,
702 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 char * gaiaXmlBlobGetLastParseError(void *p_cache)
Return the most recent XML Parse error/warning (if any)
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 gaiaXmlBlobSetFileId(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 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 * gaia_libxml2_version(void)
return the LIBXML2 version string
GAIAGEO_DECLARE char * gaiaXmlTextFromBlob(const unsigned char *blob, int size, int indent)
Extract an XMLDocument from within an XmlBLOB buffer.
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 * gaiaXmlBlobGetLastValidateError(void *p_cache)
Return the most recent XML Validate error/warning (if any)
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(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 gaiaXmlBlobAddFileId(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 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 gaiaXmlBlobSetParentId(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(void *p_cache, const char *path_or_url, unsigned char **result, int *size, char **parsing_errors)
Load an external XML Document.
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 gaiaIsSchemaValidatedXmlBlob(const unsigned char *blob, int size)
Checks if a valid XmlBLOB buffer has succesfully passed a formal Schema validation or not...
GAIAGEO_DECLARE int gaiaXmlBlobAddParentId(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 * gaiaXmlBlobGetLastXPathError(void *p_cache)
Return the most recent XPath error/warning (if any)
GAIAGEO_DECLARE int gaiaIsValidXPathExpression(void *p_cache, const char *xpath_expr)
Checks if a Text string could be a valid XPathExpression.
GAIAGEO_DECLARE char * gaiaXmlBlobGetAbstract(const unsigned char *blob, int size)
Return the Abstract from a valid XmlBLOB buffer.
GAIAGEO_DECLARE char * gaiaXmlGetInternalSchemaURI(void *p_cache, const unsigned char *xml, int xml_len)
Return the Internal SchemaURI from a valid XmlDocument.
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.