spec dosyası işleme. Şimdilik pisi-build'de işimizi görecek kadar

düzenledim.
This commit is contained in:
Barış Metin
2005-06-09 13:38:35 +00:00
parent e8b277e1d1
commit 9fbbf24968
+13 -7
View File
@@ -29,11 +29,7 @@ from a PSPEC file"""
except IndexError:
return None
def getFirstChildText(self, nodepath):
node = self.getFirstNode(nodepath)
if not node:
return None
def getNodeText(self, node):
# get the first child
try:
child = node.childNodes[0]
@@ -43,8 +39,18 @@ from a PSPEC file"""
if child.nodeType == child.TEXT_NODE:
return child.data
def getAttribute(self, nodepath, attribute):
pass
def getFirstChildText(self, nodepath):
node = self.getFirstNode(nodepath)
if not node:
return None
return self.getNodeText(node)
def getNodeAttribute(self, node, attrname):
for i in range(node.attributes.length):
attr = node.attributes.item(i)
if attr.name == attrname:
return attr.childNodes[0].data
if __name__ == "__main__":
import sys