|
|||||||
| OpenLaszlo Datasets Working with OpenLaszlo datasets? Ask your questions here. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#2
|
|||
|
|||
|
Hi,
If I am not mistaken, your XPath syntax is correct, but apparentlly OpenLaszlo does not interpret it correctly: Code:
(canvas.myData.getPointer()).xpathQuery("/myXML/person[lastName='Simpson']/lastName")
Quote:
Code:
(canvas.myData.getPointer()).xpathQuery("/myXML/person/lastName/text()")
«Array(3)#55| ['Simpson', 'Simpson', 'Burns']» or alternatively use attributes instead: Code:
<canvas width="1000" height="584" debug="true"> <dataset name="myData"> <myXML> <person show="simpsons" firstName='Homer' lastName='Simpson'> </person> <person show="simpsons" firstName='Marge' lastName='Simpson'> </person> <person show="simpsons" firstName='Montgomery' lastName='Burns'> </person> </myXML> </dataset> </canvas> Quote:
«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. Kevin
__________________
Create custom videos in a just a few minutes with our video templates or Create video mashup remixes using the free online video editor (powered by OpenLaszlo) by Sarolta Technologies Inc. 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 |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|