Top | ![]() |
![]() |
![]() |
![]() |
GXmlNode * | gxml_document_create_element () |
GXmlNode * | gxml_document_create_text () |
GXmlNode * | gxml_document_create_comment () |
GXmlNode * | gxml_document_create_cdata () |
GXmlNode * | gxml_document_create_pi () |
gboolean | gxml_document_save () |
gboolean | gxml_document_save_as () |
gboolean | gxml_document_get_indent () |
void | gxml_document_set_indent () |
gboolean | gxml_document_get_ns_top () |
void | gxml_document_set_ns_top () |
gboolean | gxml_document_get_prefix_default_ns () |
void | gxml_document_set_prefix_default_ns () |
gboolean | gxml_document_get_backup () |
void | gxml_document_set_backup () |
GXmlNode * | gxml_document_get_root () |
GFile * | gxml_document_get_file () |
void | gxml_document_set_file () |
GXmlDocument * | gxml_document_new_default () |
GXmlDocument * | gxml_document_new_default_for_path () |
GXmlDocument * | gxml_document_new_default_for_file () |
GXmlNode * gxml_document_create_element (GXmlDocument *self
,const gchar *name
,GError **error
);
This method should create a new GXmlElement.
Is a matter of you to add as a child to any other GXmlNode.
self |
the GXmlDocument instance |
|
name |
|
|
error |
location to store the error occuring, or |
GXmlNode * gxml_document_create_text (GXmlDocument *self
,const gchar *text
);
Creates a new GXmlText.
Is a matter of you to add as a child to any other GXmlNode, like a GXmlElement node.
GXmlNode * gxml_document_create_comment (GXmlDocument *self
,const gchar *text
);
Creates a new GXmlComment.
Is a matter of you to add as a child to any other GXmlNode, like a GXmlElement node.
GXmlNode * gxml_document_create_cdata (GXmlDocument *self
,const gchar *text
);
Creates a new GXmlCDATA.
Is a matter of you to add as a child to any other GXmlNode, like a GXmlElement node.
GXmlNode * gxml_document_create_pi (GXmlDocument *self
,const gchar *target
,const gchar *data
);
Creates a new GXmlProcessingInstruction.
Is a matter of you to add as a child to any other GXmlNode, like a GXmlElement node.
gboolean gxml_document_save (GXmlDocument *self
,GCancellable *cancellable
,GError **error
);
Save this GXmlDocument to "file"
If "file" doesn't exists, it creates a new file to save to.
self |
the GXmlDocument instance |
|
cancellable |
|
|
error |
location to store the error occuring, or |
gboolean gxml_document_save_as (GXmlDocument *self
,GFile *f
,GCancellable *cancellable
,GError **error
);
Save this GXmlDocument to given GFile
self |
the GXmlDocument instance |
|
f |
|
|
cancellable |
|
|
error |
location to store the error occuring, or |
gboolean
gxml_document_get_indent (GXmlDocument *self
);
Get and return the current value of the "indent" property.
Controls if writting this documents should use indent.
void gxml_document_set_indent (GXmlDocument *self
,gboolean value
);
Set the value of the "indent" property to value
.
Controls if writting this documents should use indent.
gboolean
gxml_document_get_ns_top (GXmlDocument *self
);
Get and return the current value of the "ns-top" property.
Controls if writting this documentsshould use namespaces declaration at root GXmlElement.
This removes full declaration at childs nodes, because they are just prefixed if a prefix was defined for namespace apply.
void gxml_document_set_ns_top (GXmlDocument *self
,gboolean value
);
Set the value of the "ns-top" property to value
.
Controls if writting this documentsshould use namespaces declaration at root GXmlElement.
This removes full declaration at childs nodes, because they are just prefixed if a prefix was defined for namespace apply.
gboolean
gxml_document_get_prefix_default_ns (GXmlDocument *self
);
Get and return the current value of the "prefix-default-ns" property.
Controls if writting this document should use default namespace's prefix to prefix root's childs GXmlElement.
This removes prefix on childs using default namespace. Default namespace is the first one found in "namespaces" for this document.
void gxml_document_set_prefix_default_ns (GXmlDocument *self
,gboolean value
);
Set the value of the "prefix-default-ns" property to value
.
Controls if writting this document should use default namespace's prefix to prefix root's childs GXmlElement.
This removes prefix on childs using default namespace. Default namespace is the first one found in "namespaces" for this document.
self |
the GXmlDocument instance to modify |
|
value |
the new value of the "prefix-default-ns" property |
gboolean
gxml_document_get_backup (GXmlDocument *self
);
Get and return the current value of the "backup" property.
Controls if writting to a GFile creates a backup, by default is true;
void gxml_document_set_backup (GXmlDocument *self
,gboolean value
);
Set the value of the "backup" property to value
.
Controls if writting to a GFile creates a backup, by default is true;
GXmlNode *
gxml_document_get_root (GXmlDocument *self
);
Get and return the current value of the "root" property.
XML document root node as a GXmlElement.
GFile *
gxml_document_get_file (GXmlDocument *self
);
Get and return the current value of the "file" property.
Stores a GFile to save/read XML documents to/from.
void gxml_document_set_file (GXmlDocument *self
,GFile *value
);
Set the value of the "file" property to value
.
Stores a GFile to save/read XML documents to/from.
GXmlDocument *
gxml_document_new_default (void
);
Creates a new GXmlDocument using default implementation class.
As an interface you can create your own implementation of it, but if default one is required use this.
GXmlDocument * gxml_document_new_default_for_path (const gchar *path
,GError **error
);
Creates a new GXmlDocument from a file path using default implementation class.
As an interface you can create your own implementation of it, but if default one is required use this.
GXmlDocument * gxml_document_new_default_for_file (GFile *f
,GError **error
);
Creates a new GXmlDocument from a GFile using default implementation class.
As an interface you can create your own implementation of it, but if default one is required use this.
typedef struct _GXmlDocument GXmlDocument;
Interface to handle XML documents.
Provides basic interfaces to read and create XML documents.
typedef struct _GXmlDocumentIface GXmlDocumentIface;
Interface for creating GXmlDocument implementations.