XPath Tester — Evaluate XPath Against XML & HTML Live
Test XPath expressions against XML or HTML using your browser's native XPath engine. Live results table.
Examples: //book/title, //*[class=""="x"], //@href, count(//book)
matches
| # | Node | Value |
|---|---|---|
| No matches. | ||
Cách dùng
- 1 Paste XML or HTML source in the textarea.
- 2 Pick the document mode — XML for strict parsing, HTML for lenient tag soup.
- 3 Type an XPath expression. Results update live.
- 4 Copy the matching node list as TSV.
Vì sao dùng công cụ này
- Uses your browser's native <code class="font-mono text-xs">document.evaluate</code> — no external dependency.
- Switch between XML and HTML parsers in one click.
- Live results — no submit button.
- Pure client-side — your document stays in your browser.
Câu hỏi thường gặp
Which XPath version is supported?
XPath 1.0 — the version implemented natively by browsers. XPath 2.0/3.0 features (regex, sequences, types) are not supported.
Why does my HTML query return nothing?
HTML mode wraps your fragment in <code class="font-mono">html/body</code>. Adjust expressions accordingly (e.g. <code class="font-mono">//body//div</code>).
Related tools?
<a class="text-brand-600 hover:underline" href="/jsonpath-tester">JSONPath Tester</a> for JSON queries; <a class="text-brand-600 hover:underline" href="/xml-formatter">XML Formatter</a> to clean XML first.
XPath Tester là gì?
An XPath Tester is a tool that evaluates XPath expressions against XML or HTML and displays the matching nodes. It uses the browser's native XPath engine to run queries live and presents the results in a table. Because it operates entirely client-side, the XML or HTML being queried is never uploaded, letting developers test and refine XPath expressions privately.
XPath Tester là công cụ lập trình miễn phí của Zerethon Tools. Test XPath expressions against XML or HTML using your browser's native XPath engine. Live results table. Chạy hoàn toàn trong trình duyệt — không đăng ký, không tải lên.
- Danh mục
- Lập trình
- Giá
- Miễn phí
- Quyền riêng tư
- Chạy trên trình duyệt
- Đăng ký
- Không cần
Quyền riêng tư
Dữ liệu của bạn không bao giờ rời khỏi trình duyệt trừ khi được nêu rõ. XPath Tester chạy hoàn toàn phía client — không tải lên máy chủ, không ghi log, không theo dõi dữ liệu bạn nhập.
Kiến thức cơ bản
Công cụ liên quan
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Mở công cụSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Mở công cụUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Mở công cụPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Mở công cụBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.