{"id":113354,"date":"2018-02-21T11:14:46","date_gmt":"2018-02-21T11:14:46","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=113354"},"modified":"2026-02-25T09:25:27","modified_gmt":"2026-02-25T09:25:27","slug":"xml-xpath-traversing","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/","title":{"rendered":"XML XPath Traversing"},"content":{"rendered":"\n<p>XPath is a query language used to navigate and select nodes in XML documents. In Odoo, XPath is a <strong>core mechanism for view inheritance,<\/strong> allowing developers to modify or extend existing views without rewriting them entirely.<\/p>\n\n\n\n<p>This article explains <strong>how XPath traversal works,<\/strong> how it is applied in Odoo XML views, and the correct way to use different XPath expressions and positions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Understanding XPath Traversal<\/strong><\/h2>\n\n\n\n<p><span style=\"font-size: revert; color: initial;\">When we use \/ at the beginning of the expression, it will define an absolute path to the node relative to the root. It will find the node only at the root.<\/span><\/p>\n\n\n\n<p>Consider the following XML structure:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;div class=\"node1\"&gt;\n    &lt;div class=\"node2\"&gt;\n        &lt;span class=\"node3\"&gt;\n            &lt;p class=\"node4\"&gt;\n                &lt;div class=\"node5\"\/&gt;\n            &lt;\/p&gt;\n         &lt;\/span&gt;\n     &lt;\/div&gt;\n &lt;\/div&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Forward Traversing in XPath<\/strong><\/h2>\n\n\n\n<p>Forward traversal moves from a parent node to its child or descendant nodes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><code>\/node<\/code><\/strong> \u2014 <strong>Absolute Path<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/div<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Starts traversal from the root element<\/li>\n\n\n\n<li>Selects only nodes directly under the root<\/li>\n<\/ul>\n\n\n\n<p>In the example above, this selects:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;div class=\"node1\"\/&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><code>\/node<\/code><\/strong> \u2014 Relative Path Anywhere in the Document<\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\"><br>\/\/div<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Selects all &lt;div> elements in the XML document<\/li>\n\n\n\n<li>One of the most commonly used XPath patterns in Odoo<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><code>\/node1\/node2 <\/code>\u2014 Direct Parent\u2013Child Relationship<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/div\/div<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\/ in the middle defines a direct child<\/li>\n\n\n\n<li>Selects <em>&lt;div class=&#8221;node2&#8243; ><\/em> from <em>&lt;div class=&#8221;node1&#8243;><\/em><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><code>\/node1\/\/node2<\/code> \u2014 Any Descendant of a Parent<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/div\/\/div<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\/\/ allows traversal to any depth<\/li>\n\n\n\n<li>Selects all <em>&lt;div><\/em> elements inside <em>&lt;div class=&#8221;node1&#8243;><\/em><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong><code>\/\/node1\/\/node2<\/code> \u2014 Fully Relative Traversal<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/div\/\/div<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Selects from any <em>&lt;div><\/em><\/li>\n\n\n\n<li>Selects any <em>&lt;div><\/em> inside it<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Backward Traversing in XPath<\/strong><\/h2>\n\n\n\n<p>XPath supports backward traversal using<em> <code>..<\/code><\/em> which represents the parent node.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Single-Level Backward Traversal<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/div[@class='node5']\/..<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Moves one level up<\/li>\n\n\n\n<li>Selects <em>&lt;p class=&#8221;node4&#8243;><\/em><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Multiple Levels Up<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/div[@class='node5']\/..\/..<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Moves two levels up<\/li>\n\n\n\n<li>Selects <em>&lt;span class=&#8221;node3&#8243;><\/em><\/li>\n<\/ul>\n\n\n\n<p>Each <code>..<\/code> moves one level upward in the XML hierarchy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>XPath Usage in Odoo View Inheritance<\/strong><\/h2>\n\n\n\n<p>In Odoo, XPath is used inside inherited views to locate and modify existing XML nodes.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;XPath expression&quot; position=&quot;operation&quot;&gt;\n     &lt;!-- XML content --&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<p>Examples:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/field&#091;@name=&#039;email&#039;]&quot; position=&quot;attributes&quot;&gt;\n     &lt;attribute name=&quot;readonly&quot;&gt;1&lt;\/attribute&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>XPath <code>position<\/code> Values in Odoo<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>inside<\/strong><\/h3>\n\n\n\n<p>Adds XML inside the selected node.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/group&quot; position=&quot;inside&quot;&gt;\n     &lt;field name=&quot;x_note&quot;\/&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>before<\/strong><\/h3>\n\n\n\n<p>Inserts XML before the selected node.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/field&#091;@name=&#039;phone&#039;]&quot; position=&quot;before&quot;&gt;\n     &lt;label for=&quot;phone&quot;\/&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>after<\/strong><\/h3>\n\n\n\n<p>Inserts XML after the selected node.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/field&#091;@name=&#039;phone&#039;]&quot; position=&quot;after&quot;&gt;\n     &lt;field name=&quot;mobile&quot;\/&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>replace<\/strong><\/h3>\n\n\n\n<p>Replaces the selected node completely.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/field&#091;@name=&#039;email&#039;]&quot; position=&quot;replace&quot;&gt;\n     &lt;field name=&quot;email&quot; readonly=&quot;1&quot;\/&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>attributes<\/strong><\/h3>\n\n\n\n<p>Adds or modifies attributes on the selected node.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;xpath expr=&quot;\/\/field&#091;@name=&#039;email&#039;]&quot; position=&quot;attributes&quot;&gt;\n     &lt;attribute name=&quot;required&quot;&gt;1&lt;\/attribute&gt;\n&lt;\/xpath&gt;<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common XPath Selectors in Odoo<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Select fields by name<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/field&#091;@name=&#039;amount_total&#039;]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Select buttons by action<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/button&#091;@name=&#039;action_confirm&#039;]<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Select elements by class<\/strong><\/h3>\n\n\n\n<pre class=\"EnlighterJSRAW\">\/\/div&#091;hasclass(&#039;oe_button_box&#039;)]<\/pre>\n\n\n\n<p>The <code>hasclass() <\/code>function is useful when working with CSS classes in Odoo views.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Debugging XPath in Odoo<\/strong><\/h2>\n\n\n\n<p>To understand how XPath applies to a view:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Enable Developer Mode<\/li>\n\n\n\n<li>Open the form or view<\/li>\n\n\n\n<li>Click Edit View<\/li>\n\n\n\n<li>Inspect the compiled XML structure<\/li>\n\n\n\n<li>Write XPath expressions based on the final XML<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>XPath is a powerful and flexible way to navigate XML structures in Odoo. By understanding forward and backward traversal, relative and absolute paths, and the available XPath positions, developers can confidently extend and customize Odoo views.<\/p>\n\n\n\n<p><br>Clear and readable XPath expressions make view inheritance easier to maintain, debug, and extend as requirements evolve.<\/p>\n\n\n\n<p>That\u2019s it! <br>You\u2019re all set. <strong><em>Happy coding!<\/em><\/strong><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>XPath is a query language used to navigate and select nodes in XML documents. In Odoo, XPath is a core mechanism for view inheritance, allowing developers to modify or extend existing views without rewriting them entirely. This article explains how XPath traversal works, how it is applied in Odoo XML views, and the correct way <a href=\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":88,"featured_media":45511,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2007],"tags":[6210,6206,6205,6208,6209,6207],"class_list":["post-113354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odoo","tag-odoo-xpath-traversing","tag-xml-xpath","tag-xpath","tag-xpath-backward-traversing","tag-xpath-forward-traversing","tag-xpath-traversing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>XML XPath Traversing<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"XML XPath Traversing\" \/>\n<meta property=\"og:description\" content=\"XPath is a query language used to navigate and select nodes in XML documents. In Odoo, XPath is a core mechanism for view inheritance, allowing developers to modify or extend existing views without rewriting them entirely. This article explains how XPath traversal works, how it is applied in Odoo XML views, and the correct way [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-21T11:14:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-25T09:25:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jahangir Naik\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jahangir Naik\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\"},\"author\":{\"name\":\"Jahangir Naik\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/d3efd6f1d02c2713752e7cba0b626ca6\"},\"headline\":\"XML XPath Traversing\",\"datePublished\":\"2018-02-21T11:14:46+00:00\",\"dateModified\":\"2026-02-25T09:25:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\"},\"wordCount\":459,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"keywords\":[\"Odoo Xpath traversing\",\"XML Xpath\",\"Xpath\",\"Xpath Backward traversing\",\"Xpath forward traversing\",\"XPath traversing\"],\"articleSection\":[\"Odoo\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\",\"url\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\",\"name\":\"XML XPath Traversing\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"datePublished\":\"2018-02-21T11:14:46+00:00\",\"dateModified\":\"2026-02-25T09:25:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"XML XPath Traversing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/d3efd6f1d02c2713752e7cba0b626ca6\",\"name\":\"Jahangir Naik\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/20021fdcdb324166dd5aef0f183ffb391facf8853dd58f9fcabc0950f4118c01?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/20021fdcdb324166dd5aef0f183ffb391facf8853dd58f9fcabc0950f4118c01?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Jahangir Naik\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/jahangir260\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"XML XPath Traversing","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/","og_locale":"en_US","og_type":"article","og_title":"XML XPath Traversing","og_description":"XPath is a query language used to navigate and select nodes in XML documents. In Odoo, XPath is a core mechanism for view inheritance, allowing developers to modify or extend existing views without rewriting them entirely. This article explains how XPath traversal works, how it is applied in Odoo XML views, and the correct way [...]","og_url":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2018-02-21T11:14:46+00:00","article_modified_time":"2026-02-25T09:25:27+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","type":"image\/png"}],"author":"Jahangir Naik","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Jahangir Naik","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/"},"author":{"name":"Jahangir Naik","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/d3efd6f1d02c2713752e7cba0b626ca6"},"headline":"XML XPath Traversing","datePublished":"2018-02-21T11:14:46+00:00","dateModified":"2026-02-25T09:25:27+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/"},"wordCount":459,"commentCount":4,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","keywords":["Odoo Xpath traversing","XML Xpath","Xpath","Xpath Backward traversing","Xpath forward traversing","XPath traversing"],"articleSection":["Odoo"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/","url":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/","name":"XML XPath Traversing","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","datePublished":"2018-02-21T11:14:46+00:00","dateModified":"2026-02-25T09:25:27+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/xml-xpath-traversing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/xml-xpath-traversing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"XML XPath Traversing"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/d3efd6f1d02c2713752e7cba0b626ca6","name":"Jahangir Naik","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/20021fdcdb324166dd5aef0f183ffb391facf8853dd58f9fcabc0950f4118c01?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/20021fdcdb324166dd5aef0f183ffb391facf8853dd58f9fcabc0950f4118c01?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Jahangir Naik"},"url":"https:\/\/webkul.com\/blog\/author\/jahangir260\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/113354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/88"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=113354"}],"version-history":[{"count":52,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/113354\/revisions"}],"predecessor-version":[{"id":528108,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/113354\/revisions\/528108"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/45511"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=113354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=113354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=113354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}