original_string: protected function generateNamespaceElements($namespaces, $parent_element, $node_name = 'namespace')
      {
          foreach ($namespaces as $name => $sub_namespaces) {
              $node = new \DOMElement($node_name);
              $parent_element->appendChild($node);
              $node->setAttribute('name', $name);
              $fullName = $parent_element->nodeName == $node_name
                  ? $parent_element->getAttribute('full_name') . '\\' . $name
                  : $name;
              $node->setAttribute('full_name', $fullName);
              $this->generateNamespaceElements($sub_namespaces, $node, $node_name);
          }
      }
code: protected function generateNamespaceElements($namespaces, $parent_element, $node_name = 'namespace')
      {
          foreach ($namespaces as $name => $sub_namespaces) {
              $node = new \DOMElement($node_name);
              $parent_element->appendChild($node);
              $node->setAttribute('name', $name);
              $fullName = $parent_element->nodeName == $node_name
                  ? $parent_element->getAttribute('full_name') . '\\' . $name
                  : $name;
              $node->setAttribute('full_name', $fullName);
              $this->generateNamespaceElements($sub_namespaces, $node, $node_name);
          }
      }
code_tokens: protected function generateNamespaceElements ( $ namespaces , $ parent_element , $ node_name = 'namespace' ) { foreach ( $ namespaces as $ name => $ sub_namespaces ) { $ node = new \ DOMElement ( $ node_name ) ; $ parent_element -> appendChild ( $ node ) ; $ node -> setAttribute ( 'name' , $ name ) ; $ fullName = $ parent_element -> nodeName == $ node_name ? $ parent_element -> getAttribute ( 'full_name' ) . '\\' . $ name : $ name ; $ node -> setAttribute ( 'full_name' , $ fullName ) ; $ this -> generateNamespaceElements ( $ sub_namespaces , $ node , $ node_name ) ; } }
docstring: Recursive method to create a hierarchical set of nodes in the dom.
  
  @param array[]     $namespaces     the list of namespaces to process.
  @param \DOMElement $parent_element the node to receive the children of
  the above list.
  @param string      $node_name      the name of the summary element.
  
  @return void
docstring_tokens: Recursive method to create a hierarchical set of nodes in the dom .