[gdome] problems with XPath



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="visible">True</property>.

Using 'property[ name="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 = gdome_xpeval_mkref();
GdomeXPathNSResolver nsresolv = gdome_xpeval_createNSResolver( eval,
root, exc );
GdomeXPathResult *res = 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: barbieri gmail com
   MSN: barbieri gmail com
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010
 Phone:  +1 (347) 624 6296; 08122692 sip stanaphone com
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]