class_docstr: Base class for tests of Google Test's XML output functionality.
docstr: Fetches all of the child nodes of element, a DOM Element object.
  
  Returns them as the values of a dictionary keyed by the IDs of the children.
  For <testsuites>, <testsuite>, <testcase>, and <property> elements, the ID
  is the value of their "name" attribute; for <failure> elements, it is the
  value of the "message" attribute; for <properties> elements, it is the value
  of their parent's "name" attribute plus the literal string "properties";
  CDATA sections and non-whitespace text nodes are concatenated into a single
  CDATA section with ID "detail".  An exception is raised if any element other
  than the above four is encountered, if two child elements with the same
  identifying attributes are encountered, or if any other type of node is
  encountered.
  
  Args:
    element: DOM Element object
  
  Returns:
    Dictionary where keys are the IDs of the children.
docstr_tok: ["Fetches","all","of","the","child","nodes","of","element",",","a","DOM","Element","object",".","Returns","them","as","the","values","of","a","dictionary","keyed","by","the","IDs","of","the","children",".","For","<","testsuites",">",",","<","testsuite",">",",","<","testcase",">",",","and","<","property",">","elements",",","the","ID","is","the","value","of","their","``","name","''","attribute",";","for","<","failure",">","elements",",","it","is","the","value","of","the","``","message","''","attribute",";","for","<","properties",">","elements",",","it","is","the","value","of","their","parent","'s","``","name","''","attribute","plus","the","literal","string","``","properties","''",";","CDATA","sections","and","non-whitespace","text","nodes","are","concatenated","into","a","single","CDATA","section","with","ID","``","detail","''",".","An","exception","is","raised","if","any","element","other","than","the","above","four","is","encountered",",","if","two","child","elements","with","the","same","identifying","attributes","are","encountered",",","or","if","any","other","type","of","node","is","encountered",".","Args",":","element",":","DOM","Element","object","Returns",":","Dictionary","where","keys","are","the","IDs","of","the","children","."]
code: def _GetChildren(self, element):
      """Fetches all of the child nodes of element, a DOM Element object.
  
      Returns them as the values of a dictionary keyed by the IDs of the children.
      For <testsuites>, <testsuite>, <testcase>, and <property> elements, the ID
      is the value of their "name" attribute; for <failure> elements, it is the
      value of the "message" attribute; for <properties> elements, it is the value
      of their parent's "name" attribute plus the literal string "properties";
      CDATA sections and non-whitespace text nodes are concatenated into a single
      CDATA section with ID "detail".  An exception is raised if any element other
      than the above four is encountered, if two child elements with the same
      identifying attributes are encountered, or if any other type of node is
      encountered.
  
      Args:
        element: DOM Element object
  
      Returns:
        Dictionary where keys are the IDs of the children.
      """
  
      children = {}
      for child in element.childNodes:
          if child.nodeType == Node.ELEMENT_NODE:
              if child.tagName == "properties":
                  self.assertTrue(
                      child.parentNode is not None,
                      "Encountered <properties> element without a parent",
                  )
                  child_id = (
                      child.parentNode.getAttribute("name")
                      + "-properties"
                  )
              else:
                  self.assertTrue(
                      child.tagName in self.identifying_attribute,
                      "Encountered unknown element <%s>"
                      % child.tagName,
                  )
                  child_id = child.getAttribute(
                      self.identifying_attribute[child.tagName]
                  )
              self.assertNotIn(child_id, children)
              children[child_id] = child
          elif child.nodeType in [
              Node.TEXT_NODE,
              Node.CDATA_SECTION_NODE,
          ]:
              if "detail" not in children:
                  if (
                      child.nodeType == Node.CDATA_SECTION_NODE
                      or not child.nodeValue.isspace()
                  ):
                      children[
                          "detail"
                      ] = child.ownerDocument.createCDATASection(
                          child.nodeValue
                      )
              else:
                  children["detail"].nodeValue += child.nodeValue
          else:
              self.fail(
                  "Encountered unexpected node type %d" % child.nodeType
              )
      return children
  
file_path: open-asset-importer/contrib/googletest/googletest/test/gtest_xml_test_utils.py
imports: import re
  from xml.dom import minidom, Node
  from googletest.test import gtest_test_utils
label_desc: Use image node_id 2 for calling the GTestXMLTestCase obj's underlying member method code with example usage: obj._GetChildren(element) and returns: children