How to use xfconf to store data like bookmarks

Christian Dywan christian at twotoasts.de
Mon Dec 15 19:01:29 CET 2008


Am Mon, 15 Dec 2008 17:50:40 +0100
schrieb "Nick Schermer" <nickschermer at gmail.com>:

> 2008/12/15 Stephan Arts <stephan at xfce.org>:
> > On Mon, Dec 15, 2008 at 3:58 PM, Mike Massonnet
> > <mmassonnet at gmail.com> wrote:
> >> Hey Christian,
> >>
> >> It is an interesting reading.  The GLib bookmark file parser is
> >> indeed unsuitable, and exposing bookmarks to dbus with xfconf is
> >> useless.
> >
> > I suppose you guys don't really like the idea of building a clean
> > implementation and importing it in libxfce4util?
> 
> There is an xml parser in glib (GMarkupParser) which works fine and is
> already used in the xfconf-xml-backend, panel, menueditor, thunar and
> libxfce4menu. It allows easy custom implementations (you don't need
> libxml if you store 'simple' data like bookmarks) and is fast enough
> for most people.

The problem in my case was that I needed actual support for any XML/
XBEL files that someone else might have written or generated.
Unfortunatley GMarkup lacks most notably awareness of namespaces and is
in a few other respects not reading proper XML.

Now GBookmarkFile does curiously implement namespace support on top of
GMarkup in a way that works for most XML. With some spare time I guess a
clean XBEL reader could be written in a similar fashion. Or if someone
is up to it, they could implement namespaces in GMarkup.

ciao,
    Christian



More information about the Xfce4-dev mailing list