title: How to find the nearest common ancestors of two or more nodes?
body: <p>Users selects two or more elements in a HTML page. What i want to accomplish is to find those elements' common ancestors (so body node would be the common ancestor if none found before) ?</p>
  
  <p>P.S: It can be achieved with XPath but it is not a preferable option for me. Also it may be found with css selector parsing but i think it is a dirty method (?)</p>
  
  <p>Thank you.</p>