Here is my current xpath code "/html/head/title".
But you know that in the real world environment html the code format is usually interrupted, for example. The tag is <html>missing, it may cause an exception. So, I would like to know if there is a safe way to extract the tag <title>? (something like getElementByTagName)
source
share