Top | ![]() |
![]() |
![]() |
![]() |
GXmlTDocumentGXmlTDocument — Class implemeting GXmlDocument interface, not tied to libxml-2.0 library. |
#define | GXML_TYPE_TDOCUMENT |
enum | GXmlTDocumentReadType |
struct | GXmlTDocument |
struct | GXmlTDocumentClass |
This class use xmlTextWriter to write down XML documents using its contained GXmlNode children or other XML structures.
gboolean gxml_tdocument_save_to (GXmlTDocument *self
,GFile *f
,GCancellable *cancellable
,GError **error
);
gxml_tdocument_save_to
has been deprecated since version 0.8.1 and should not be used in newly-written code.
Replaced by gxml_tdocument_save_as()
.
self |
the GXmlTDocument instance |
|
f |
|
|
cancellable |
|
|
error |
location to store the error occuring, or |
GXmlTDocument *
gxml_tdocument_new_from_stream (GInputStream *stream
);
GXmlTDocument *
gxml_tdocument_new_from_string (const gchar *str
);
GXmlTDocument * gxml_tdocument_new_from_path_with_readtype_func (const gchar *path
,GXmlTDocumentReadTypeFunc func
,void *func_target
);
GXmlTDocument * gxml_tdocument_new_from_uri_with_readtype_func (const gchar *uri
,GXmlTDocumentReadTypeFunc func
,void *func_target
);
GXmlTDocument * gxml_tdocument_new_from_file_with_readtype_func (GFile *file
,GXmlTDocumentReadTypeFunc func
,void *func_target
);
GXmlTDocument * gxml_tdocument_new_from_stream_with_readtype_func (GInputStream *stream
,GXmlTDocumentReadTypeFunc func
,void *func_target
);
GXmlTDocument * gxml_tdocument_new_from_string_with_readtype_func (const gchar *str
,GXmlTDocumentReadTypeFunc func
,void *func_target
);
GXmlTDocumentReadType (*GXmlTDocumentReadTypeFunc) (GXmlNode *node
,xmlTextReader *tr
,void *user_data
);
Delegate function to control parsing of XML documents. Return GXML_TDOCUMENT_READ_TYPE_NEXT to skip all children nodes of current GXmlNode; GXML_TDOCUMENT_READ_TYPE_CONTINUE continue parsing nodes or GXML_TDOCUMENT_READ_TYPE_STOP to stop reading.
While you get the current xmlTextReader used in parsing, you can control next action to take depending on current node.
gboolean gxml_tdocument_tw_save_as (GXmlDocument *doc
,GFile *f
,GCancellable *cancellable
,GError **error
);
void gxml_tdocument_write_document (GXmlDocument *doc
,xmlTextWriter *tw
,GError **error
);
void gxml_tdocument_start_node (GXmlDocument *doc
,xmlTextWriter *tw
,GXmlNode *node
,gboolean root
,GeeArrayList * *declared_ns
,GError **error
);
void gxml_tdocument_read_doc (GXmlDocument *doc
,GFile *file
,GXmlTDocumentReadTypeFunc rtfunc
,void *rtfunc_target
,GError **error
);
Read a GXmlDocument from a GFile, parsing is controller using GXmlTDocumentReadTypeFunc, if null it parse all nodes.
void gxml_tdocument_read_doc_stream (GXmlDocument *doc
,GInputStream *istream
,GXmlTDocumentReadTypeFunc rtfunc
,void *rtfunc_target
,GError **error
);
Reads document from GInputStream objects.
GXmlTDocumentReadType gxml_tdocument_read_node (GXmlNode *node
,xmlTextReader *tr
,GXmlTDocumentReadTypeFunc rntfunc
,void *rntfunc_target
,GError **error
);
Parse current node in xmlTextReader.
Returns: a GXmlNode respresenting current parsed one.
#define GXML_TYPE_TDOCUMENT (gxml_tdocument_get_type ())
The type for GXmlTDocument.
struct GXmlTDocument { GXmlTNode parent_instance; GXmlTDocumentPrivate * priv; GeeArrayList* _namespaces; GeeArrayList* _children; };
Class implemeting GXmlDocument interface, not tied to libxml-2.0 library.
This class use xmlTextWriter to write down XML documents using its contained GXmlNode children or other XML structures.
struct GXmlTDocumentClass { GXmlTNodeClass parent_class; };
The class structure for GXML_TYPE_TDOCUMENT
. All the fields in this structure are private and should never be accessed directly.