def getPathsByKey(defaultPaths, elementNode, key):
 if (key not in elementNode.attributes):
  return defaultPaths
 word = str(elementNode.attributes[key]).strip()
 evaluatedLinkValue = getEvaluatedLinkValue(elementNode, word)
 if ((evaluatedLinkValue.__class__ == dict) or (evaluatedLinkValue.__class__ == list)):
  convertToPaths(evaluatedLinkValue)
  return getPathsByLists(evaluatedLinkValue)
 elementNodeObject = getElementNodeObject(evaluatedLinkValue)
 if (elementNodeObject == None):
  return defaultPaths
 return elementNodeObject.getPaths()

def getPathsByKey ( defaultPaths , elementNode , key ) : if ( key not in elementNode . attributes ) : return defaultPaths word = str ( elementNode . attributes [ key ] ) . strip ( ) evaluatedLinkValue = getEvaluatedLinkValue ( elementNode , word ) if ( ( evaluatedLinkValue . __class__ == dict ) or ( evaluatedLinkValue . __class__ == list ) ) : convertToPaths ( evaluatedLinkValue ) return getPathsByLists ( evaluatedLinkValue ) elementNodeObject = getElementNodeObject ( evaluatedLinkValue ) if ( elementNodeObject == None ) : return defaultPaths return elementNodeObject . getPaths ( )
get paths by key .