FoXmlDoc

FoXmlDoc — libxml2 xmlDoc document

Functions

Types and Values

Description

Boxed object type for libxml2 xmlDoc document.

Functions

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.


fo_xml_doc_version_info ()

const LibfoVersionInfo *
fo_xml_doc_version_info (void);

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

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.

Parameters

fo_xml_doc

FoXmlDoc.

 

fo_xml_doc_get_base ()

gchar *
fo_xml_doc_get_base (FoXmlDoc *fo_xml_doc);

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 .

Parameters

fo_xml_doc

FoXmlDoc for which to set base

 

URL

New xml:base URL

 

Types and Values

FO_XML_DOC_ERROR

#define FO_XML_DOC_ERROR fo_xml_doc_error_quark ()

enum FoXmlDocError

Members

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

   

FoXmlDoc

typedef struct _FoXmlDoc FoXmlDoc;