Method
GLibMarkupParseContextparse
Declaration [src]
gboolean
g_markup_parse_context_parse (
GMarkupParseContext* context,
const gchar* text,
gssize text_len,
GError** error
)
Description [src]
Feed some data to the GMarkupParseContext
.
The data need not be valid UTF-8; an error will be signaled if
it’s invalid. The data need not be an entire document; you can
feed a document into the parser incrementally, via multiple calls
to this function. Typically, as you receive data from a network
connection or file, you feed each received chunk of data into this
function, aborting the process if an error occurs. Once an error
is reported, no further data may be fed to the GMarkupParseContext
;
all errors are fatal.
Parameters
text
-
Type:
const gchar*
Chunk of text to parse.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. text_len
-
Type:
gssize
Length of
text
in bytes. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the method if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.