playMaker

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

ilovelessons

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
xPath Query questions when using Datamaker Xml
« on: March 18, 2017, 11:50:37 AM »
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: 11779
  • Official Playmaker Support
    • View Profile
Re: xPath Query questions when using Datamaker Xml
« Reply #1 on: March 19, 2017, 10:56:54 PM »
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