7 Oct
2014
7 Oct
'14
3:02 p.m.
On Tue, 2014-10-07 at 14:40 +0200, Tavmjong Bah wrote:
namedview = root.find(inkex.addNS('namedview', 'sodipodi')) inkex.debug( namedview.get("id") ) namedview.set("id", "NewID" ) inkex.debug( namedview.get("id") )
Just to break this down, you're doing:
root.find("{http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%7Dnamedview")
Try the same disfiguration in the set command:
namedview.set(inkex.addNS('id', 'sodipodi'), "NewID")
You should also be able to do instead:
document.getNamedView()
But looking at inkex and a few examples in the code, I don't really like the addNS design. It's making lots of ugly code. (adds to list)
Martin,