DiagramPreview
기본 파서No AILocal previewDebuggingExport

XPath 테스터

XPath 테스터 내용을 붙여 넣고 설정, API 응답, SEO 파일, AI 생성 스니펫을 점검할 수 있는 로컬 미리보기를 생성합니다.

예제
Matched nodes준비됨
Your preview will appear here.

관련 도구로 계속하기

현재 미리보기를 가까운 워크플로로 옮겨 변환, 디버깅 또는 내보내기를 계속하세요.

SQL to ER Diagram

Convert CREATE TABLE SQL into a Mermaid ER diagram.

열기
JSON Schema Visualizer

Inspect JSON Schema properties, types, required fields, and composition groups.

열기
JSON Schema 폼 미리보기

JSON Schema 폼 미리보기: 이 소스를 로컬에서 미리보고 기술 문서용으로 디버깅합니다.

열기

사용 방법

  1. 1Put the XPath expression on the first line, then add --- and the XML or HTML document.
  2. 2Start with a broad path and narrow it gradually.
  3. 3Inspect matched nodes and document outline to catch namespace or nesting mistakes.
  4. 4Verify final expressions in the same parser used by your tests or automation.

사용 사례

XML feed debuggingHTML selector testingSitemap inspectionTest assertion designAI XPath validation

FAQ

Why does an XPath expression return no nodes?

Common causes include namespaces, selecting text nodes instead of elements, invalid document structure, or a path that assumes a different nesting level.

Can I test HTML as well as XML?

Yes for common snippets, but parser behavior can differ from browser automation libraries and XML processors.

How do I make XPath more robust?

Prefer stable attributes and clear hierarchy over brittle positional indexes whenever possible.

XPath Tester runs XPath expressions against XML or HTML snippets and previews matched nodes, document outline, and result summaries.

It is useful for sitemap inspection, XML feed debugging, scraping selectors, test assertions, and AI-generated XPath expressions that need validation.

Namespaces, document mode, and text-node selection can change results, so previewing the match list before committing an expression saves time.

Demo: inspect sitemap URLs with XPath

XPath is useful for XML sitemaps, but namespaces and repeated url nodes can make quick checks error-prone. Preview the match list before turning an expression into a script.

  • Use local-name() when namespace handling is uncertain.
  • Avoid positional indexes until you know the URL order is stable.
  • Check both loc and lastmod when reviewing sitemap quality.
//*[local-name()="url"]/*[local-name()="loc"]/text()
---
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://example.com/en</loc><lastmod>2026-06-18</lastmod></url>
</urlset>

Debug pattern: namespace-aware XPath testing

XPath examples often fail on real sitemaps, SVG, XML feeds, and SOAP responses because the document uses namespaces. A useful tester should make the namespace problem visible instead of making users guess.

  • Check the root xmlns before writing the expression.
  • Use local-name() when you need a quick namespace-independent inspection.
  • For production scripts, prefer explicit namespace bindings over local-name() shortcuts.
//*[local-name()="url"]/*[local-name()="loc"]/text()

XPath 테스터 검토 체크리스트

문서, PR, 장애 회고, 인수인계 전에 소스 내용을 시각적으로 확인할 때 XPath 테스터을 사용할 수 있습니다. XPath 테스터: 이 소스를 로컬에서 미리보고 디버깅합니다.

내보내기 전 라벨 가독성, 관계 정확성, 민감 정보 포함 여부, 입력 수정 후 미리보기 일관성을 확인하세요.

제한과 문제 해결

미리보기가 실패하면 입력을 가장 작은 완전한 예제로 줄이고 문법을 확인한 뒤 섹션을 다시 추가하세요.

미리보기는 검토 화면이지 사실의 원천은 아닙니다. 중요한 결과는 사람이 확인해야 합니다.

테스트할 예제 입력

  • RSS titles: //item/title --- <rss><channel><item><title>Release notes</title></item><item><title>API guide</title></item></channel></rss>
  • HTML links: //a/@href --- <html><body><a href="/docs">Docs</a><a href="/tools">Tools</a></body></html>
  • Simple XML: //book[@category="api"]/title --- <catalog><book category="api"><title>OpenAPI Guide</title></book><book category="ops"><title>Nginx Notes</title></book></catalog>

도구 완성도

기본 파서

기본 파서

이 도구는 빠른 구조 점검에 초점을 둡니다. 리뷰와 디버깅에 사용하고 중요한 결과는 별도로 검증하세요.

라벨은 안정적인 내보내기, 깊은 디버깅, 빠른 파싱, AI 보조 생성 중 어디에 더 적합한지 알려줍니다.