8 Feb
2007
8 Feb
'07
4:24 p.m.
path = "/svg/g[@inkscape:groupmode='layer' and @inkscape:label='slices']/*"
inkex.xml.xpath.Evaluate(path,self.document,context=self.ctx)
Thanks -- with those changes it works. Sure was simpler than my solution, but I have never seen xpath before today. Looks like there's a lot to learn.
I won't trouble you for an explanation here -- I'd rather you write a tutorial on the wiki for all newbz like me :) Pretty please.
Oh, is there an easy way (under Linux) to see the xml and the result of an xpath Evaluate call? A way to see what results? I have this feeling the xpath path string is a little like SQL in the way it returns a sub set...
I'll put the script together for Michael Grosberg again.
/d