Xpath tools: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 1: | Line 1: | ||
List of tools for xpath expression selection/query | List of tools for xpath expression selection/query | ||
== Comparison of xpath tools == | |||
<table border=1 class="wikitable sortable"> | |||
<tr> | |||
<th>Method</th> | |||
<th>Pros</th> | |||
<th>Cons</th> | |||
</tr> | |||
<tr> | |||
<td>chrome extension [https://chrome.google.com/webstore/detail/xpath-helper/hgimnogjllphhhkhlmebbmlgjoejdpjl XPath Helper]</td> | |||
<td>worked on online webpage</td> | |||
<td>NOT work on offline file</td> | |||
</tr> | |||
<tr> | |||
<td>Sublime [https://packagecontrol.io/packages/xpath xpath] plugin</td> | |||
<td>worked on offline file</td> | |||
<td>NOT work on online webpage</td> | |||
</tr> | |||
</table> | |||
== chrome javascript console == | == chrome javascript console == | ||
Line 31: | Line 51: | ||
== Sublime text editor == | == Sublime text editor == | ||
[https://packagecontrol.io/packages/xpath xpath | [https://packagecontrol.io/packages/xpath xpath] plugin: "[https://www.sublimetext.com/ Sublime Text] plugin for easier cursor navigation of XML and HTML files using XPath 1.0." | ||
Steps | Steps |
Revision as of 11:15, 13 July 2021
List of tools for xpath expression selection/query
Comparison of xpath tools
Method | Pros | Cons |
---|---|---|
chrome extension XPath Helper | worked on online webpage | NOT work on offline file |
Sublime xpath plugin | worked on offline file | NOT work on online webpage |
chrome javascript console
- 選單: 工具 -> 開發人員工具 -> Console
- 確認符合 XPath 規則的結果,例如 XPath 規則是 "//img",可在 Console 輸入 $x("//img") ,按 Enter。就會顯示符合 xpath 規則的結果[1][2]:
image hosted by flickr
chrome extension
- 輸入 ctrl + shift + x 或點選工具列上的 x 圖示,開啟 XPath Helper console (顯示在網頁上方)
- 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方
image hosted by flickr
Natu WebSync - Chrome 線上應用程式商店
- 開啟「開發人員工具」
- 點選標籤「WebSync」-> 輸入 xpath 規則
firefox extension
Firebug + FirePath for Firefox
- 選單: 工具 --> 網頁開發者 --> Firebug --> 開啟 Firebug
- 切換到 FirePath 標籤
- 輸入 xpath 規則。就會凸顯符合 xpath 規則的網頁元件地方
Sublime text editor
xpath plugin: "Sublime Text plugin for easier cursor navigation of XML and HTML files using XPath 1.0."
Steps
- Open the Command Palette
- Menu: Tools -> Command Palette
- or press the keyboard shortcut[3]: ctrl + shift + p on Win or command + shift + p on Mac )
- and select Xpath: Query document
- input the Xpath expression
Other tools
- XPath Expression Tester for XML [Last visited: 2020-06-09]
- Free Online XPath Tester / Evaluator for XML [Last visited: 2020-06-09]
References
- References
Related articles
Troubleshooting of ...
- PHP, cUrl, Python, selenium, HTTP status code errors
- Database: SQL syntax debug, MySQL errors, MySQLTuner errors or PostgreSQL errors
- HTML/Javascript: Troubleshooting of javascript, XPath
- Software: Mediawiki, Docker, FTP problems, online conference software
- Test connectivity for the web service, Web Ping, Network problem, Web user behavior, Web scrape troubleshooting
Template