XML XPath Tester & Odoo XPath Generator
Paste XML or an Odoo view, test XPath with every match highlighted in the source, and click any tag to get its XPath and a ready-to-paste inherited-view snippet.
Safe by design
Scripts in pages you load or paste never run, and nothing is stored.
Fast, no sign-up
No account and no daily limit for normal use.
Built for developers
Made for scraping, testing, SEO checks and front-end work.
Test XPath on XML and write Odoo view inheritance faster
Paste any XML document, open a file or load an address, then type an XPath expression. The editor highlights every matching tag in the source, the match count updates as you type, and Enter steps through the results. Syntax errors in the XML are reported with the exact line, so you can fix them straight away.
For Odoo developers the tool understands view files: click inside any tag (or pick it in the Tree) and you get an XPath that is unique inside the view's arch, such as //field[@name='partner_id'], //page[@name='other_information'] or //div[hasclass('oe_title')]. Choose a position (after, before, inside, replace or attributes) and copy a ready <xpath expr=… position=…> block, the <field> shorthand, or a complete inherited ir.ui.view record with inherit_id filled in.
Odoo's hasclass() function works in your expressions too, just as in view inheritance. Documents with namespaces, such as sitemaps, SVG or SOAP, work with plain names because the default namespace can be ignored, and prefixes like xsl: or image: are resolved from the document.
How to use it
- 1Paste your XML or Odoo view, or press Sample to try an Odoo sale.order form.
- 2Type an XPath expression and watch the matches light up in the source.
- 3Click inside the tag you want to change to generate its XPath.
- 4Pick a position and copy the <xpath> snippet or full inherited record into your module.
What Our Users Say
Real feedback from people using WeblixTools, checked by our team before it appears.
Frequently Asked Questions
How do I find the right XPath for an Odoo inherited view?
Paste the parent view (from the source code or Settings → Technical → Views), click inside the element you want to extend, and copy the generated Odoo XPath. It prefers stable attributes such as name, and checks that the expression matches only one element inside the view's arch, because Odoo applies the first match.
Does it support Odoo's hasclass() function?
Yes. Expressions such as //div[hasclass('oe_title')] or //button[hasclass('btn-primary', 'o_form_button')] are converted to the equivalent standard XPath, so you can test them exactly as you would write them in a view.
Which Odoo versions does it work with?
Any version. View inheritance with xpath expr and position has worked the same way for years. The sample uses current syntax (list views and the chatter tag); for Odoo 16 and older, use tree instead of list in your expressions.
Why does //url match nothing in my sitemap?
Sitemaps, SVG and SOAP documents declare a default namespace, which normally hides elements from plain XPath. Keep "Ignore default namespace" ticked and //url/loc works as expected. Prefixed names such as //image:loc are resolved from the document's own declarations.
Is my XML uploaded?
No. Pasted text and opened files are parsed in your browser only. When you use Load from URL, our server fetches that address for you and sends it back without storing it.