tools/metrics/common/pretty_print_xml.py
def PrettyPrintElementTreeNode(self, node, indent=0):
    """Pretty-prints the given XML node at the given indent level.

    Args:
      node: The ElementTree node to pretty-print.
      indent: The current indent level.

    Returns:
      The pretty-printed string (including embedded newlines).

    Raises:
      Error: if the XML has unknown tags or attributes.
    """
    # Handle comment nodes.
    if node.tag is ET.Comment:
      return '<!--%s-->\n' % node.text

    # Handle element nodes.
    return self._PrettyPrintElement(node, indent)
Pretty-prints the given XML node at the given indent level.

    Args:
      node: The ElementTree node to pretty-print.
      indent: The current indent level.

    Returns:
      The pretty-printed string (including embedded newlines).

    Raises:
      Error: if the XML has unknown tags or attributes.
    
Pretty-prints the given XML node at the given indent level.
Pretty - prints the given XML node at the given indent level .
def PrettyPrintElementTreeNode(self, node, indent=0):
    if node.tag is ET.Comment:
      return '<!--%s-->\n' % node.text
    return self._PrettyPrintElement(node, indent)
def PrettyPrintElementTreeNode ( self , node , indent = 0 ) : if node . tag is ET . Comment : return '<!--%s-->\n' % node . text return self . _PrettyPrintElement ( node , indent )
Pretty-prints the given XML node at the given indent level.
Pretty - prints the given XML node at the given indent level .
"""Pretty-prints the given XML node at the given indent level.

    Args:
      node: The ElementTree node to pretty-print.
      indent: The current indent level.

    Returns:
      The pretty-printed string (including embedded newlines).

    Raises:
      Error: if the XML has unknown tags or attributes.
    """ # Handle comment nodes. # Handle element nodes.
The pretty-printed string (including embedded newlines).
The pretty - printed string ( including embedded newlines ) .
if the XML has unknown tags or attributes.
if the XML has unknown tags or attributes .
Error
self
node
The ElementTree node to pretty-print.
The ElementTree node to pretty - print .
indent
The current indent level.
The current indent level .