Re: Trying to pretty-print XML within pango markup language
- From: Dave Malcolm <david davemalcolm demon co uk>
- To: Owen Taylor <otaylor redhat com>
- Cc: gtk-list gnome org
- Subject: Re: Trying to pretty-print XML within pango markup language
- Date: 26 May 2003 19:11:14 +0000
On Mon, 2003-05-26 at 14:09, Owen Taylor wrote:
> On Mon, 2003-05-26 at 06:17, Sven Neumann wrote:
> > Hi,
> > Dave Malcolm <david davemalcolm demon co uk> writes:
> > > I want to use the Pango markup language to display syntax-highlighted
> > > XML in a GtkTreeView. Unfortunately, XML looks a lot like the Pango
> > > markup language. Is there a way of "escaping" my "<" and ">" symbols,
> > > perhaps using "<"; and ">"?
> > It works exactly like that. Did you try it?
(oops... forgot the trailing semicolons)
> Worth mentioning:
> gchar* g_markup_escape_text (const gchar *text,
> gssize length);
> may be useful if you want to escape blocks of text.
Thanks! I was looking at the Pango Reference Manual and entirely missed
the docs for GMarkup in GLib. The former could do with a link to the
latter, as it wasn't clear that the Pango markup language is merely a
special case of GMarkup (this was in a default install of RedHat 8).
I've got it working now; seems to cope well with the various complex
examples I'm sending it.
] [Thread Prev