summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb570d9)
raw | patch | inline | side by side (parent: fb570d9)
author | aurium <aurium@users.sourceforge.net> | |
Wed, 26 Aug 2009 15:32:53 +0000 (15:32 +0000) | ||
committer | aurium <aurium@users.sourceforge.net> | |
Wed, 26 Aug 2009 15:32:53 +0000 (15:32 +0000) |
share/extensions/inkex.py | patch | blob | history |
index 2ae5d6c21377caab8bd25217fb5dd29e3137956d..665575c6b67b0047a98d2f7af66ba42409b7821f 100755 (executable)
for node in self.document.xpath(path, namespaces=NSS):
self.selected[i] = node
+ def getElementById(self, id):
+ path = '//*[@id="%s"]' % id
+ el_list = self.document.xpath(path, namespaces=NSS)
+ if el_list:
+ return el_list[0]
+ else:
+ return None
+
def getdocids(self):
docIdNodes = self.document.xpath('//@id', namespaces=NSS)
for m in docIdNodes: