Go Back   OpenLaszlo Developers Forums > Programming in OpenLaszlo > OpenLaszlo Datasets

OpenLaszlo Datasets Working with OpenLaszlo datasets? Ask your questions here.

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 03-28-2012, 09:43 AM
kmeixner kmeixner is offline
Senior Community Member
Join Date: Dec 2006
Location: Toronto, Ontario, Canada
Posts: 636
kmeixner is on a distinguished road

If I am not mistaken, your XPath syntax is correct, but apparentlly OpenLaszlo does not interpret it correctly:


«Array(3)#54| [<lastName>Simpson</lastName>, <lastName>Simpson</lastName>, <lastName>Burns</lastName>]»
You could get an array of all of the last names and figure out which one's are matches using:

Which would return:

«Array(3)#55| ['Simpson', 'Simpson', 'Burns']»

or alternatively use attributes instead:

<canvas width="1000" height="584" debug="true">

<dataset name="myData">
<person show="simpsons" firstName='Homer' lastName='Simpson'>
<person show="simpsons" firstName='Marge' lastName='Simpson'>
<person show="simpsons" firstName='Montgomery' lastName='Burns'>


«Array(2)#0| [<person show="simpsons" firstName="Homer" lastName="Simpson"/>, <person show="simpsons" firstName="Marge" lastName="Simpson"/>]»

OpenLaszlo's implementation of XPath is incomplete, possibly that is why your original XPath query does not work.

Me: Stack Overflow | Assembla | Twitter | LinkedIn | www.kevinmeixner.com
Company: Web | Facebook | Twitter

Last edited by kmeixner; 03-28-2012 at 09:44 AM. Reason: move end code markup to correct spot
Reply With Quote


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 10:22 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.