Re: TeraScript-Talk: Retrieving data from XML

2016-01-07 Thread Wayne Irvine
Cheers, this seems to do the trick: <@NUMROWS ARRAY='<@ELEMENTVALUE OBJECT="myDom" XPATH="/ppproduct/relateditems/relateditem/title">’> I’m returning a specific value within the data to an array and NUMROWing it. Will have to find a value that all records have. I still think using the count() p

RE: TeraScript-Talk: Retrieving data from XML

2016-01-07 Thread Robert Shubert
Yes, XPATH is a general way of accessing data in a XML document. It has nothing to do with TeraScript specifically, we just pass your input into third party tools that return results. As for counting, I think the best way to do this is to get the array and then @NUMROWS it. You can get an arra

Re: TeraScript-Talk: Retrieving data from XML

2016-01-07 Thread Wayne Irvine
Cheers Robert, not sure why I have never come across that before in the manual. It seems to do all I want to do, but doesn’t give examples for how to do things like count(). I’ll look up XPATH in general on Google (assuming it’s a standard implementation) but would it be possible for you to spec

TeraScript-Talk: Retrieving data from XML

2016-01-07 Thread Wayne Irvine
I’ve been tasked with converting a large static site to dynamic database driven CMS. The first step was downloading all the pages and then converting them to a XML structure (see example below). I then load the text file into a DOM and can pull out ELEMENTVALUES at will and inject them into tab