GXmlParser

GXmlParser — XML parser engine for GXmlDomDocument implementations.

Functions

Types and Values

Description

Functions

gxml_parser_write_file ()

void
gxml_parser_write_file (GXmlParser *self,
                        GFile *file,
                        GCancellable *cancellable,
                        GError **error);

Writes a GXmlDomDocument to a GFile

Parameters

self

the GXmlParser instance

 

file

 

 

cancellable

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_write_string ()

gchar *
gxml_parser_write_string (GXmlParser *self,
                          GError **error);

Writes a GXmlDomDocument to a string

Parameters

self

the GXmlParser instance

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_write_stream ()

void
gxml_parser_write_stream (GXmlParser *self,
                          GOutputStream *stream,
                          GCancellable *cancellable,
                          GError **error);

Writes a GXmlDomDocument to a GOutputStream

Parameters

self

the GXmlParser instance

 

stream

 

 

cancellable

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_read_file ()

void
gxml_parser_read_file (GXmlParser *self,
                       GFile *file,
                       GCancellable *cancellable,
                       GError **error);

Writes a GXmlDomDocument to a GOutputStream

Parameters

self

the GXmlParser instance

 

file

 

 

cancellable

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_read_stream ()

void
gxml_parser_read_stream (GXmlParser *self,
                         GInputStream *stream,
                         GCancellable *cancellable,
                         GError **error);

Read a GXmlDomDocument from a GInputStream

Parameters

self

the GXmlParser instance

 

stream

 

 

cancellable

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_read_string ()

void
gxml_parser_read_string (GXmlParser *self,
                         const gchar *str,
                         GCancellable *cancellable,
                         GError **error);

Read a GXmlDomDocument from a GFile

Parameters

self

the GXmlParser instance

 

str

 

 

cancellable

 

 

error

location to store the error occuring, or NULL to ignore

 

gxml_parser_get_backup ()

gboolean
gxml_parser_get_backup (GXmlParser *self);

Get and return the current value of the "backup" property.

Controls if, when writing to a file, a backup should be created.

Parameters

self

the GXmlParser instance to query

 

Returns

the value of the "backup" property


gxml_parser_set_backup ()

void
gxml_parser_set_backup (GXmlParser *self,
                        gboolean value);

Set the value of the "backup" property to value .

Controls if, when writing to a file, a backup should be created.

Parameters

self

the GXmlParser instance to modify

 

value

the new value of the "backup" property

 

gxml_parser_get_indent ()

gboolean
gxml_parser_get_indent (GXmlParser *self);

Get and return the current value of the "indent" property.

Controls if, when writing, identation should be used.

Parameters

self

the GXmlParser instance to query

 

Returns

the value of the "indent" property


gxml_parser_set_indent ()

void
gxml_parser_set_indent (GXmlParser *self,
                        gboolean value);

Set the value of the "indent" property to value .

Controls if, when writing, identation should be used.

Parameters

self

the GXmlParser instance to modify

 

value

the new value of the "indent" property

 

gxml_parser_get_node ()

GXmlDomNode *
gxml_parser_get_node (GXmlParser *self);

Get and return the current value of the "node" property.

A GXmlDomDocument to read to or write from

Parameters

self

the GXmlParser instance to query

 

Returns

the value of the "node" property

Types and Values

enum GXmlParserError

Members

GXML_PARSER_ERROR_INVALID_DATA_ERROR

   

GXML_PARSER_ERROR_INVALID_FILE_ERROR

   

GXML_PARSER_ERROR_INVALID_STREAM_ERROR

   

GXmlParser

typedef struct _GXmlParser GXmlParser;

XML parser engine for GXmlDomDocument implementations.


struct GXmlParserIface

struct GXmlParserIface {
	GTypeInterface parent_iface;
	void (*write_file) (GXmlParser* self, GFile* file, GCancellable* cancellable, GError** error);
	gchar* (*write_string) (GXmlParser* self, GError** error);
	void (*write_stream) (GXmlParser* self, GOutputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_file) (GXmlParser* self, GFile* file, GCancellable* cancellable, GError** error);
	void (*read_stream) (GXmlParser* self, GInputStream* stream, GCancellable* cancellable, GError** error);
	void (*read_string) (GXmlParser* self, const gchar* str, GCancellable* cancellable, GError** error);
	gboolean (*get_backup) (GXmlParser* self);
	void (*set_backup) (GXmlParser* self, gboolean value);
	gboolean (*get_indent) (GXmlParser* self);
	void (*set_indent) (GXmlParser* self, gboolean value);
	GXmlDomNode* (*get_node) (GXmlParser* self);
};

Interface for creating GXmlParser implementations.

Members

GTypeInterface parent_iface;

the parent interface structure

 

write_file ()

virtual method called by gxml_parser_write_file()

 

write_string ()

virtual method called by gxml_parser_write_string()

 

write_stream ()

virtual method called by gxml_parser_write_stream()

 

read_file ()

virtual method called by gxml_parser_read_file()

 

read_stream ()

virtual method called by gxml_parser_read_stream()

 

read_string ()

virtual method called by gxml_parser_read_string()

 

get_backup ()

getter method for the abstract property "backup"

 

set_backup ()

setter method for the abstract property "backup"

 

get_indent ()

getter method for the abstract property "indent"

 

set_indent ()

setter method for the abstract property "indent"

 

get_node ()

getter method for the abstract property "node"