FoXmlDoc

FoXmlDoc — libxml2 xmlDoc document

Synopsis

#define             FO_XML_DOC_ERROR
GQuark              fo_xml_doc_error_quark              (void);
enum                FoXmlDocError;
                    FoXmlDoc;
const LibfoVersionInfo* fo_xml_doc_version_info         (void);
FoXmlDoc*           fo_xml_doc_new_from_filename        (const gchar *filename,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);
FoXmlDoc*           fo_xml_doc_new_from_memory          (const gchar *buffer,
                                                         gint size,
                                                         const gchar *URL,
                                                         const gchar *encoding,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);
FoXmlDoc*           fo_xml_doc_new_from_string          (const gchar *curr,
                                                         const gchar *URL,
                                                         const gchar *encoding,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);
FoXmlDoc*           fo_xml_doc_ref                      (FoXmlDoc *fo_xml_doc);
void                fo_xml_doc_unref                    (FoXmlDoc *fo_xml_doc);
gchar*              fo_xml_doc_get_base                 (FoXmlDoc *fo_xml_doc);
void                fo_xml_doc_set_base                 (FoXmlDoc *fo_xml_doc,
                                                         const gchar *URL);

Description

Boxed object type for libxml2 xmlDoc document.

Details

FO_XML_DOC_ERROR

#define FO_XML_DOC_ERROR fo_xml_doc_error_quark ()


fo_xml_doc_error_quark ()

GQuark              fo_xml_doc_error_quark              (void);

Get the error quark for FoXmlDoc.

If the quark does not yet exist, create it.

Returns :

Quark associated with FoXmlDoc errors.

enum FoXmlDocError

typedef enum
{
  FO_XML_DOC_ERROR_FAILED,
  FO_XML_DOC_ERROR_FILENAME_PARSE_FAILED,
  FO_XML_DOC_ERROR_MEMORY_PARSE_FAILED,
  FO_XML_DOC_ERROR_NO_FILENAME
} FoXmlDocError;


FoXmlDoc

typedef struct _FoXmlDoc FoXmlDoc;


fo_xml_doc_version_info ()

const LibfoVersionInfo* fo_xml_doc_version_info         (void);

Returns :


fo_xml_doc_new_from_filename ()

FoXmlDoc*           fo_xml_doc_new_from_filename        (const gchar *filename,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);

Creates a new FoXmlDoc.

filename :

File or URL from which to create an FoXmlDoc.

libfo_context :

FoLibfoContext with parameters affecting parsing.

error :

Indication of any error that occurred.

Returns :

the newly created FoXmlDoc. Use fo_xml_doc_unref to free the result.

fo_xml_doc_new_from_memory ()

FoXmlDoc*           fo_xml_doc_new_from_memory          (const gchar *buffer,
                                                         gint size,
                                                         const gchar *URL,
                                                         const gchar *encoding,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);

Creates a new FoXmlDoc.

buffer :

Pointer to a char array.

size :

Size of the array.

URL :

Base URL to use for the document.

encoding :

The encoding of the document, or NULL.

libfo_context :

FoLibfoContext with parameters affecting parsing.

error :

Indication of any error that occurred.

Returns :

the newly created FoXmlDoc. Use fo_xml_doc_unref to free the result.

fo_xml_doc_new_from_string ()

FoXmlDoc*           fo_xml_doc_new_from_string          (const gchar *curr,
                                                         const gchar *URL,
                                                         const gchar *encoding,
                                                         FoLibfoContext *libfo_context,
                                                         GError **error);

Creates a new FoXmlDoc.

curr :

Pointer to a zero-terminated string.

URL :

Base URL to use for the document.

encoding :

The encoding of the document, or NULL.

libfo_context :

FoLibfoContext with parameters affecting parsing.

error :

Indication of any error that occurred.

Returns :

the newly created FoXmlDoc. Use fo_xml_doc_unref to free the result.

fo_xml_doc_ref ()

FoXmlDoc*           fo_xml_doc_ref                      (FoXmlDoc *fo_xml_doc);

Make a copy of a FoXmlDoc.

fo_xml_doc :

a FoXmlDoc

Returns :

a newly allocated FoXmlDoc. This value must be freed using #fo_xml_doc_unref().

fo_xml_doc_unref ()

void                fo_xml_doc_unref                    (FoXmlDoc *fo_xml_doc);

Unref and possibly free a FoXmlDoc.

fo_xml_doc :

FoXmlDoc.

fo_xml_doc_get_base ()

gchar*              fo_xml_doc_get_base                 (FoXmlDoc *fo_xml_doc);

fo_xml_doc :

Returns :


fo_xml_doc_set_base ()

void                fo_xml_doc_set_base                 (FoXmlDoc *fo_xml_doc,
                                                         const gchar *URL);

Sets the base URL of fo_xml_doc.

fo_xml_doc :

FoXmlDoc for which to set base

URL :

New xml:base URL