예제 #1
0
 def __getitem__(self, i):
     if type(i) == IntType:
         if (i > 0) and (i < len(self)):
             return self.item(i)
         else:
             raise IndexError
     return _cODP.ODPNode_getNodeValue(
         _cODP.ODPNamedNodeMap_getNamedItem(self.this, name))
예제 #2
0
 def getNamedItem(self, name):
     return _ntype(_cODP.ODPNamedNodeMap_getNamedItem(self.this, name))
예제 #3
0
 def get(self, name, value=None):
     I = _cODP.ODPNamedNodeMap_getNamedItem(self.this, name)
     if I is None:
         return value
     return _cODP.ODPNode_getNodeValue(I)