[Laszlo-user] XML to Lazslo Object Mapping

Elliot Winard ewinard at laszlosystems.com
Thu Apr 5 08:43:19 PDT 2007


What exactly are you trying to do?

You can use datasets to drive views using xpaths.  [1]  The mapping is 
in the xpath in the datapath attribute.


When i moved from Flex development to Laszlo the dataset-to-object 
mapping was a little tricky to get at first.


Hope this helps,

-e



[1]


<canvas>

     <dataset name="ds">

         <person firstname="Bob" lastname="McKensie" />

         <person firstname="Doug" lastname="McKensie" />

         <person firstname="Ted" lastname="McKensie" />

         <person firstname="Sue" lastname="Williams" />

     </dataset>


     <view datapath="ds:/">

         <text datapath="person/@firstname" />

         <simplelayout />

     </view>

</canvas>




On Thu, Apr 5, 2007 at  5:35 AM, Tiago Cardoso wrote:



Hello Francisco,


I think that the dataset is evaluated and transformed in objects since 
it has data.


If you notice, they are all LzNodes.

What do you want really to do ? Instantiate directly dataset nodes to 
specific classes ?


Take care,


Tiago Cardoso


On 4/4/07, Francisco Jose Peredo <  fperedo at sefintab.gob.mx> wrote: Hi!

Is there a way to "hide" the dataset, and present the XML inside the

dataset as a collection of Laszlo "objects"?

some kind of Object / DataSet Mapping? Can it be built? Is there an

example somewhere?

Thanks

bye







---=---===-------

Elliot Winard

Sr. Software Engineer

Laszlo Studios

---=---===-------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20070405/73c9c97a/attachment.html


More information about the Laszlo-user mailing list