playMaker

Author Topic: xPath Query questions when using Datamaker Xml  (Read 1189 times)

ilovelessons

  • Junior Playmaker
  • **
  • Posts: 70
xPath Query questions when using Datamaker Xml
« on: March 18, 2017, 02:50:37 PM »
Hi,

I am presently using Datamaker XML in Playmaker and having some problems specifying my xPath Query.. if my data looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <record>
       <LastName>Smith</LastName>
       <Sales>16753</Sales>
       <Country>UK</Country>
       <Quarter>Qtr 3</Quarter>
    </record>
    <record>
       <LastName>Johnson</LastName>
       <Sales>14808</Sales>
       <Country>USA</Country>
       <Quarter>Qtr 4</Quarter>
    </record>
</data-set>


I have attached a picture of the xQuery Panel. What do I need to type in xPath Query? I tried   " /data-set/record "  but it doesn't work. 

Any ideas or advice?


jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: xPath Query questions when using Datamaker Xml
« Reply #1 on: March 20, 2017, 01:56:54 AM »
Hi,

 you need this



 // means "anywhere in the hierarchy", and then in bracket you define further what you want from that node, else since you have several record nodes, it would pick the first one, but you likely want a specific one.


Bye,

 Jean