title: What is the safest way to extract <title> from an HTML file using xpath?
body: <p>Here is my current xpath code <code>"/html/head/title"</code>.</p>
  
  <p>But you know, in the real world html environment, the code format usually broken, e.g. <code>&lt;html&gt;</code> tag is missing could cause an exception. So, I would like to know if there's a safe way to extract the <code>&lt;title&gt;</code> tag? (something like getElementByTagName)</p>