parameters: (element, on_element)
return_statement: return res
docstring: .. function: traverse_xsyn  traverses element and returns concatenated lists of calling on_element of each element.
  
          :param  element     element in DOM.
          :param  on_element  callback on element that returns list of values.
docstring_summary: .. function: traverse_xsyn  traverses element and returns concatenated lists of calling on_element of each element.
docstring_tokens: .. function : traverse_xsyn traverses element and returns concatenated lists of calling on_element of each element .
function: def traverse_xsyn(element, on_element):
      """
      .. function: traverse_xsyn  traverses element and returns concatenated lists of calling on_element of each element.
  
          :param  element     element in DOM.
          :param  on_element  callback on element that returns list of values.
      """
      res = on_element(element)
      for child in element.childNodes:
          child_results = traverse_xsyn(child, on_element)
          res += child_results
      return res
function_tokens: def traverse_xsyn ( element , on_element ) : res = on_element ( element ) for child in element . childNodes : child_results = traverse_xsyn ( child , on_element ) res += child_results return res