On Feb 12, 2007, at 4:57 PM, Frisco Del Rosario wrote:
I copied this assertion out of a JUnit recipe book, but it seems
that getTextAtXpath isn't part of the OL XPath API. What's the
OpenLaszlo equivalent?
<canvas>
<include href="lzunit"/>
<simplelayout axis="y" spacing="10"/>
<dataset name="myData">
<myXML>
<person>
<firstName>Homer</firstName>
<lastName>Simpson</lastName>
</person>
</myXML>
</dataset>
<TestSuite>
<TestCase>
<method name="testXML">
assertEquals(myData.getTextAtXpath("myXML/person/firstName"),
"Homer");
</method>
</TestCase>
</TestSuite>
</canvas>
--
assertEquals(Frisco Del Rosario, OpenLaszlo tester)
see the xpathQuery function of the datapointer class, an example
usage being as in:
canvas.datasets['name'].getPointer().xpathQuery('elem/elem/text()');
(first answer posted to list, hello!)
James.