problems with XPath

"Gustavo Sverzut Barbieri" <[email protected]> Mon, 27 Mar 2006 17:59:36 -0300
Newsgroups gmane.comp.gnome.gdome
Message-ID <[email protected]>
Hello,

I'm trying to write a program to deal with Glade files using GDome and
XPath, but I cannot get some things to work:

Glade has an element <widget ...>, which has children <property ...>,
one of them is <property name=3D"visible">True</property>.

Using 'property[@name=3D"visible"]/text()' as XPath doesn't work unless
I remove <!DOCTYPE glade-interface SYSTEM "/path/to/glade.dtd">.

My guess was that it requires a NSResolver, I already tried with:

GdomeXPathEvaluator *eval =3D gdome_xpeval_mkref();
GdomeXPathNSResolver nsresolv =3D gdome_xpeval_createNSResolver( eval,
root, exc );
GdomeXPathResult *res =3D gdome_xpeval_evaluate( eval, expression, wid,
nsresolv, 0, NULL, exc );

But it didn't work either :-(

As I said, it works if I skip DOCTYPE or xmlns on glade-interface, but
then I need to modify the document and I loose the
gdome_doc_getElementById() :-(

any ideas?

--
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: [email protected]
   MSN: [email protected]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
 Phone:  +1 (347) 624 6296; [email protected]
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net