MarkupParseContext

A parse context is used to parse a stream of bytes that you expect to contain marked-up text.

See glib.markup_parse_context.MarkupParseContext.new_, #GMarkupParser, and so on for more details.

Members

Functions

endParse
bool endParse()

Signals to the #GMarkupParseContext that all data has been fed into the parse context with glib.markup_parse_context.MarkupParseContext.parse.

getElement
string getElement()

Retrieves the name of the currently open element.

getElementStack
string[] getElementStack()

Retrieves the element stack from the internal state of the parser.

getPosition
void getPosition(int lineNumber, int charNumber)

Retrieves the current line number and the number of the character on that line. 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."

getUserData
void* getUserData()

Returns the user_data associated with context.

parse
bool parse(string text, ptrdiff_t textLen)

Feed some data to the #GMarkupParseContext.

pop
void* pop()

Completes the process of a temporary sub-parser redirection.

push
void push(glib.types.MarkupParser parser, void* userData)

Temporarily redirects markup data to a sub-parser.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.