Using XPath toolbar with HTML5 in v.22
Posted: Mon Feb 17, 2020 6:05 pm
According to the "What's New" information for oXygen 22.0, "You can use the XPath Toolbar or XPath Builder View to quickly query HTML documents using XPath expressions." I tried to test this out on a minimal HTML 5 file:
This is valid HTML 5 and oXygen's Validate function reports that it is valid. But if I try to search on any XPath, like //p, I get the error message:
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<div>
<p>This is a very simple test of <a href="https://www.oxygenxml.com">oXygen</a> support for XPath in HTML 5</p>
</div>
</body>
</html>
Am I doing something wrong? I thought the idea was that XPath would be possible on valid HTML5 even if it is not well-formed XML?XPath failed due to: The element type "link" must be terminated by the matching end-tag "</link>"