Example #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))
Example #2
0
 def getNamedItem(self, name):
     return _ntype(_cODP.ODPNamedNodeMap_getNamedItem(self.this, name))
Example #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)