A parse context is used to parse marked-up documents.
You can feed any number of documents into a context, as long as no errors occur; once an error occurs, the parse context can't continue to parse text (you have to destroy it and create a new parse context).
Signals to the ParseContext that all data has been fed into the parse context with parse().
This method reports an error if the document isn't complete, for example if elements are still open.
Exceptions:
Glib::MarkupError
int Glib::Markup::ParseContext::get_char_number
(
)
const
Retrieves the number of the current character on the current line.
Intended for use in error messages; there are no strict semantics for what constitutes the "current" character number other than "the best number we could come up with for error messages."
Intended for use in error messages; there are no strict semantics for what constitutes the "current" line number other than "the best number we could come up with for error messages."
The data need not be valid UTF-8; an error will be signalled 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 ParseContext; all errors are fatal.
The data need not be valid UTF-8; an error will be signalled 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 ParseContext; all errors are fatal.
Parameters:
text
Chunk of text to parse.
Exceptions:
Glib::MarkupError
The documentation for this class was generated from the following file: