25 Jun
2007
25 Jun
'07
7:27 p.m.
I have a standalone python program that generates svg layouts for 'n-up' printing, like four postcards arranged on a page. Or 30 address labels, or whatever.
Trying to package it as an Inkscape effect, I run into something like this:
svg_xml_string = foo() reader = Sax2.Reader() content = reader.fromString(svg_xml_string) self.document.documentElement.appendChild(content.documentElement)
dies with:
xml.dom.WrongDocumentErr: Node is from a different document
Well duh. :-)
So how can I move svg_xml_string into the Inkscape document tree? I've RTFM'ed on PyXML, but didn't find it.
Thanks, Terry