03: glib: gmarkup: G_MARKUP_TEXTSTART
- From: Guido Draheim <guidod-2003- gmx de>
- To: gtk-list gnome org
- Subject: 03: glib: gmarkup: G_MARKUP_TEXTSTART
- Date: Thu, 02 Jan 2003 17:34:33 +0100
I have made good success with an extension of G_MARKUP_TEXTSTART
to the gmarkup interpreter - it simply guides the xml reader to
issue callbacks for any element before the root element. That
way one can even see <? and other elements instead of dropping
them. It makes gmarkup more useful as a general xml reader
instead of a halfdone gscanner replacement.
The change is overly simple: add a constant into gmarkup.h like
G_MARKUP_TEXTSTART and set the initial state of the parser in
xml_g_parse_context_new() like
if (flags & G_MARKUP_TEXTSTART) context->state = STATE_INSIDE_TEXT;
(or see http://xmlg.sourceforge.net/xml/gmarkup.html#160:gmarkup.c )
-- have fun, guido counter.li.org #81555
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]