af0f15967d0e5a3743bcbf2ecea875991c8cda84,framework/utils/xmlUtils.py,,findPath,#Any#Any#,146

Before Change


    @ Out, findPath, None or xml.etree.ElementTree.Element, None if not found or element if found
  
  path = path.split("|")
  if len(path)>1:
    oneUp = findPath(root,"|".join(path[:-1]))
    if oneUp is not None:
      toSearch = fixXmlTag(path[-1])
      return oneUp.find(toSearch)
    else:
      return None
  else:
    toSearch = fixXmlTag(path[-1])
    return root.find(toSearch)

def findPathEllipsesParents(root,path,docLevel=0):
  
    As with findPath, but the parent nodes are kept and ellipses text are used to replace siblings in the resulting tree.
    @ In, root, xml.etree.ElementTree.Element, the node to start searching along

After Change


  assert("|" not in path), "Update XML search to use XPATH syntax!"
  // edit tags for allowable characters
  path = fixTagsInXpath(path)
  found = root.findall(path)
  if len(found) < 1:
    return None
  else:
    return found[0]

def findPathEllipsesParents(root,path,docLevel=0):
  
    As with findPath, but the parent nodes are kept and ellipses text are used to replace siblings in the resulting tree.
    @ In, root, xml.etree.ElementTree.Element, the node to start searching along
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: idaholab/raven
Commit Name: af0f15967d0e5a3743bcbf2ecea875991c8cda84
Time: 2017-10-30
Author: paul.talbot@inl.gov
File Name: framework/utils/xmlUtils.py
Class Name:
Method Name: findPath


Project Name: streamlit/streamlit
Commit Name: 3e96b208fe5bc38223eb453b68a03dae51a33544
Time: 2018-10-22
Author: thiagot@gmail.com
File Name: lib/streamlit/caseconverters.py
Class Name:
Method Name: to_lower_camel_case


Project Name: open-mmlab/mmdetection
Commit Name: f0644d7d7137a0f7369616ed1740379e47a918cf
Time: 2020-03-19
Author: melikovk@gmail.com
File Name: tools/test.py
Class Name: MultipleKVAction
Method Name: __call__