Anil Subudhi

Greenhorn
+ Follow
since Apr 26, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anil Subudhi

hi,
i want to retrieve multiple records from database using resultset in xml file.Is there any way to get no of records present from db in xml file. My requirement is below red color x value i set to manually but i need it will set using auto return value by some function or any other way in xml file.
------------------------------------------------------------

<?xml version="1.0"?>
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd"
xmlns:db="http://www.milyn.org/xsd/smooks/db-routing-1.1.xsd"
xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.2.xsd"
xmlns:ds="http://www.milyn.org/xsd/smooks/datasource-1.1.xsd">

<ds:direct bindOnElement="#document" datasource="DB" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/dbase" username="root" password="praya123" autoCommit="false" />
<db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true">
<db:statement>SELECT * FROM custinfo</db:statement>
<db:resultSet name="rs_custinfo" />
</db:executor>
<db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true">
<db:statement>select * from callRates</db:statement>
<db:resultSet name="rs_callRates" />
</db:executor>
<db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true">
<db:statement>select * from InvoiceSummary</db:statement>
<db:resultSet name="rs_InvoiceSummary" />
</db:executor>
<db:executor executeOnElement="Invoice" datasource="DB" executeBefore="true">
<db:statement>select * from InvoiceDetail</db:statement>
<db:resultSet name="rs_InvoiceDetail" />
</db:executor>

<ftl:freemarker applyOnElement="Invoice">
<ftl:template>

<!--
<#assign x=1>
<#list 1..x as i>


<DETAIL>
<DT_INV_HDR1>${rs_custinfo[i].BillingAccNo}</DT_INV_HDR1>
<DT_INV_HDR2>${rs_custinfo[i].CustNo}</DT_INV_HDR2>
<DT_INV_HDR3>${rs_custinfo[i].InvoiceNo}</DT_INV_HDR3>
<DT_INV_HDR4>${rs_custinfo[i].InvoiceDate}</DT_INV_HDR4>
<DT_INV_HDR5>${rs_custinfo[i].PaymentDueDate}</DT_INV_HDR5>
<DT_INV_HDR6/>
<DT_INV_HDR7/>
</DETAIL>

</#list>

-->

</ftl:template>
</ftl:freemarker>
</smooks-resource-list>

Ulf Dittmer wrote:This XML format looks unfamiliar to me; is it something the Smooks framework uses? Which would make this a question about Smooks, not about HTML or JavaScript; is that correct?



yes it is smooks framework ...i want to retrieve multiple records as per given above like generic smooks config file...is it possible then how can i do it...The above code is not correct one ...but my requirement is like this.
How to get no of record counts in xml file from resultset.
i need to retrieve data from database using xml loop ..my problem is how to loop in xml...

xml file given below



red color need to be generic so how can i do this.