| xmlroff Reference Manual | ||||
|---|---|---|---|---|
#define FO_XML_DOC_ERROR GQuark fo_xml_doc_error_quark (void); enum FoXmlDocError; FoXmlDoc; 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);
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. |
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* 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. |
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. |
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. |
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().
|
void fo_xml_doc_unref (FoXmlDoc *fo_xml_doc);
Unref and possibly free a FoXmlDoc.
fo_xml_doc : |
FoXmlDoc. |