edinc
06-10-2008, 02:01 AM
Hi find how we can call Images from XML to LZX program...
below is the code, but can any buddy tell me if the images size are different different then how we can put those image in out display table/grid in smiler size or how i can make all image size are equal size.
XML Code:
<?xml version="1.0" ?>
<newbooks>
<book category="MCSC">
<title lang="en">Learn MCSC</title>
<image>resource\mcse1.jpg </image>
<author>Mr. Srikant</author>
<year>2005</year>
<price>rs.300.00</price>
</book>
<book category="java">
<title lang="en">Java in 24 Days</title>
<image>resource\sun.jpg </image>
<author>Srinivas</author>
<year>2005</year>
<price>rs.290.99</price>
</book>
<book category="mba">
<title lang="en">Prepare for the MBA Exams</title>
<image>resource\mba.jpg </image>
<author>Rakesh</author>
<author>Sankar</author>
<year>2003</year>
<price>rs 490.99</price>
</book>
</newbooks>
LZX Code is :
<canvas debug="true">
<dataset name="dset" src="newbooks.xml"/>
<simplelayout axis="y" spacing="50"/>
<view datapath="dset:/newbooks/book">
<simplelayout axis="x"/>
<image x="20" y="3" datapath="image/text()"/>
<text datapath="title/text()"/>
<text onclick="LzBrowser.loadURL('http://www.google.co.in')" datapath="author/text()"/>
<text datapath="year/text()"/>
<text datapath="price/text()"/>
</view>
<datepicker>
<handler name="oninit" >
var d = new Date();
d.setMonth( d.getMonth() - 1 );
this.setAttribute( "selecteddate", d );
</handler>
</datepicker>
</canvas>
plz do reply how i can all image size Equal or same size in hight width ?
thanks & regards
edinc
below is the code, but can any buddy tell me if the images size are different different then how we can put those image in out display table/grid in smiler size or how i can make all image size are equal size.
XML Code:
<?xml version="1.0" ?>
<newbooks>
<book category="MCSC">
<title lang="en">Learn MCSC</title>
<image>resource\mcse1.jpg </image>
<author>Mr. Srikant</author>
<year>2005</year>
<price>rs.300.00</price>
</book>
<book category="java">
<title lang="en">Java in 24 Days</title>
<image>resource\sun.jpg </image>
<author>Srinivas</author>
<year>2005</year>
<price>rs.290.99</price>
</book>
<book category="mba">
<title lang="en">Prepare for the MBA Exams</title>
<image>resource\mba.jpg </image>
<author>Rakesh</author>
<author>Sankar</author>
<year>2003</year>
<price>rs 490.99</price>
</book>
</newbooks>
LZX Code is :
<canvas debug="true">
<dataset name="dset" src="newbooks.xml"/>
<simplelayout axis="y" spacing="50"/>
<view datapath="dset:/newbooks/book">
<simplelayout axis="x"/>
<image x="20" y="3" datapath="image/text()"/>
<text datapath="title/text()"/>
<text onclick="LzBrowser.loadURL('http://www.google.co.in')" datapath="author/text()"/>
<text datapath="year/text()"/>
<text datapath="price/text()"/>
</view>
<datepicker>
<handler name="oninit" >
var d = new Date();
d.setMonth( d.getMonth() - 1 );
this.setAttribute( "selecteddate", d );
</handler>
</datepicker>
</canvas>
plz do reply how i can all image size Equal or same size in hight width ?
thanks & regards
edinc