Local namespace-aware XPath evaluator

XPath 1.0 through a real parser and evaluator, with explicit prefix→URI mappings.

  • Runs in your browser
  • No upload
  • Check before download

Inputs stay in this tab and are not uploaded or saved automatically. Optional aggregate usage counts and coarse processing diagnostics are sent only after consent, without input content or filenames. Clearing or closing loses inputs; save needed outputs first.

Formats and limits

XPath 1.0 through a real parser and evaluator, with explicit prefix→URI mappings. Unprefixed element names select elements with no namespace; map a prefix for a default namespace. Nodes export a text serialization plus their paths, and scalar results show their type and text. Up to 1,000 nodes, with finite parser and result budgets; no extensions, document(), DTD or remote resources. An XML declaration may leave out the encoding or declare UTF-8 (case-insensitive). Other encodings are rejected before the file is read or exported, and the output is always UTF-8.

UTF-8 only. Input up to 1 MiB; XML up to 100,000 UTF-16 units and depth 64; JSON up to 20,000 nodes. JSON Lines up to 16 MiB, 100,000 records and 1 MiB per value. Output up to 32 MiB. Queries run for up to 3 seconds and other jobs for up to 10 seconds in a worker you can cancel. XSD native memory is limited to 64 MiB; this is not the whole worker or DOM heap.

Namespace mappings

How to use it

  1. Choose the source and mode

    Load the XML, enter an XPath 1.0 query, and map each query prefix to its namespace URI explicitly. A document’s default namespace also needs a prefix in the query, because unprefixed names in a query select elements with no namespace.

  2. Configure the domain parameters

    Load the books example and bind b→urn:books. /b:books/b:book[@id="001"]/b:title selects the A title node. Wrapping it in string(...) returns the typed scalar text A instead of a serialized node.

  3. Inspect diagnostics and download

    For node results, check the exported paths, text and serialization. Scalar results include their type and text. An empty node array is a valid no-match result. Save xpath-results.json to get the exact result representation.

Formats and limits

Why is this input rejected or empty?

If an element with a namespace seems to be missing, first check the prefix binding and the exact URI. JSONPath syntax that begins with $ is not XPath. Undefined prefixes, DTDs and remote document functions are rejected and never fetched.

Which parser profile and limits apply?

XPath 1.0 with a real parser and limited recursion, string and result budgets, up to 1000 nodes. No XPath 2/3, extension code or document() access. Showing text does not execute the selected XML.

Are inputs or referenced files sent to a server?

Parsing runs locally in a browser worker. URLs inside the input are not used to fetch remote documents. Supply any schema dependencies the tool supports as local files, keep your source file separately, and download the results before you close the page.