Avoid use of lxml.etree.strip_elements() which sometimes seems to not exist; most odd

git-svn-id: https://eggbotcode.googlecode.com/svn/trunk@111 72233254-1b6c-9e9c-5072-401df62706fb
pull/47/head
newman.daniel1 2010-09-14 04:55:45 +00:00
rodzic 30c95dd498
commit 3096de9ad2
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -22,7 +22,8 @@ class EggBotStripData( inkex.Effect ):
def effect( self ):
'''Main entry point: check to see which tab is selected, and act accordingly.'''
self.svg = self.document.getroot()
inkex.etree.strip_elements( self.svg, inkex.addNS( 'eggbot', 'svg' ) )
for node in self.svg.xpath( '//svg:eggbot', namespaces=inkex.NSS ):
self.svg.remove( node )
inkex.errormsg( gettext.gettext( "Okay, I've removed all Eggbot data from this Inkscape file. Have a nice day!" ) )
e = EggBotStripData()