Relative XML Path

  • 13 April 2022
  • 1 reply

In the XML example below, what is the XML path in AA to get to a value like the price of the book 'Everyday Italian' without looping through the nodes.


I think in VBA something like this works:

//book[title/text()='Everyday Italian']/price


but that gives me an error in AA


'//DefaultNSPrefix:book[title/DefaultNSPrefix:text()='Everyday Italian']/DefaultNSPrefix:price' has an invalid token.


Example XML:


<?xml version="1.0" encoding="UTF-8"?>




<book category="cooking">

  <title lang="en">Everyday Italian</title>

  <author>Giada De Laurentiis</author>





<book category="children">

  <title lang="en">Harry Potter</title>

  <author>J K. Rowling</author>





<book category="web">

  <title lang="en">XQuery Kick Start</title>

  <author>James McGovern</author>

  <author>Per Bothner</author>

  <author>Kurt Cagle</author>

  <author>James Linn</author>

  <author>Vaidyanathan Nagarajan</author>





<book category="web">

  <title lang="en">Learning XML</title>

  <author>Erik T. Ray</author>






1 reply

Userlevel 6
Badge +9

Hello @Marco DeConto​ 


Thanks for writing us at the AA forum.


You can leverage the below bot form BotStore for the use case mentioned>


For assistance through our Support Engineers, please reach us via Support case>


You can also check our Live Chat support option, for quick assistance from our engineers>


You can also search for available documentation in>


For more details, you are welcome to leverage our open source portal where multiple use case is available>