GLib.MarkupParseContext.prototype.parse
function parse(text: String, text_len: Number(gssize)): Boolean { // Gjs wrapper for g_markup_parse_context_parse() }
Feed some data to the GLib.MarkupParseContext.
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 GLib.MarkupParseContext; all errors are fatal.
- text
chunk of text to parse
- text_len
length of text in bytes
- Returns
false if an error occurred, true on success