def processXMLElementByFunction(manipulationFunction, xmlElement):
 if ('target' not in xmlElement.attributeDictionary):
  print 'Warning, there was no target in processXMLElementByFunction in solid for:'
  print xmlElement
  return
 target = evaluate.getEvaluatedLinkValue(str(xmlElement.attributeDictionary['target']).strip(), xmlElement)
 if (target.__class__.__name__ == 'XMLElement'):
  manipulationFunction(target, xmlElement)
  return
 lineation.processXMLElementByGeometry(target, xmlElement)
 manipulationFunction(xmlElement, xmlElement)

def processXMLElementByFunction ( manipulationFunction , xmlElement ) : if ( 'target' not in xmlElement . attributeDictionary ) : print 'Warning, there was no target in processXMLElementByFunction in solid for:' print xmlElement return target = evaluate . getEvaluatedLinkValue ( str ( xmlElement . attributeDictionary [ 'target' ] ) . strip ( ) , xmlElement ) if ( target . __class__ . __name__ == 'XMLElement' ) : manipulationFunction ( target , xmlElement ) return lineation . processXMLElementByGeometry ( target , xmlElement ) manipulationFunction ( xmlElement , xmlElement )
process the xml element by manipulationfunction .