JSON to GraphQL Schema
Draft a GraphQL type definition from a sample JSON response.
Run XPath expressions against your own XML and see every node that matches.
If a document declares a default xmlns, an unprefixed name matches nothing. Use //*[local-name()="title"] instead.
The XPath Tester evaluates an expression against your own XML using the browser's own XPath 1.0 engine, listing every matching node with its value — or the number, string or boolean the expression returned.
XPath is how you select nodes out of an XML document, and it is very easy to write an expression that looks right and matches nothing. This tester runs one against your own document and lists every match with its value, so you can confirm it before it goes into code.
It uses the browser's own XPath engine, which means the full 1.0 language: child and descendant axes, attribute selection with @, predicates including positional ones, the text() and node() tests, and functions such as contains(), starts-with(), normalize-space(), count() and last(). Expressions that return a number, a string or a boolean rather than a node set are shown as their value.
Axes, predicates, positional selection and the standard functions all behave exactly as they will in your own code.
The count updates as you type, so you can tell immediately whether a predicate narrowed the selection or emptied it.
An expression returning count(), a string or a boolean shows its value rather than an empty match list.
Selecting @id or text() works and displays properly, which is where many testers quietly show nothing.
The forms you actually type are listed with examples beside your data, including the namespace workaround.
The document you want to query, which must be well-formed.
Start broad, such as //book, then narrow with predicates.
Each match shows its node name and text value, with a count above.
Add a predicate such as [@id="2"] or [price<10] to select exactly what you need.
Prefix it with @, so //book/@id selects the id attribute of every book. Inside a predicate the same syntax filters: //book[@id="2"].
It searches at any depth from that point. //title finds every title element anywhere, while /catalogue/book/title matches only that exact path.
Most often a namespace. A document with a default xmlns needs a namespace-aware expression, such as //*[local-name()="title"], because an unprefixed name in XPath 1.0 means "no namespace".
XPath 1.0, which is what browsers implement and what the vast majority of tools and libraries use.
What people who use the XPath Tester think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the XPath Tester. It takes half a minute and no account.
Write the first reviewDraft a GraphQL type definition from a sample JSON response.
Compare two semantic versions and test them against a range.
Make every editor agree on indentation, line endings and charset.
Find the MIME type for any file extension, or the extensions for a type.
Convert between signed and unsigned, with the negation steps shown.
Generate MAC addresses that are correctly marked as locally administered.
Draw a grid layout and get the CSS, including named template areas.
Identify a UUID's version and variant, and extract its timestamp.