Example: Example: PhoneListPhoneList (4/4)(4/4)
public XML transform(XML cardlist) {
"
"
"
"
public XML transform(XML cardlist) {
"
"
"
"
.plug("MAIN", makeList(cardlist));
}
.plug("MAIN", makeList(cardlist));
}
public XML makeList(XML cardlist) {
XML r = [[<h:ul><[CARDS]></h:ul>]]);
for (Element c : cardlist.getElements("b:card[b:phone]")) {
public XML makeList(XML cardlist) {
XML r = [[<h:ul><[CARDS]></h:ul>]]);
for (Element c : cardlist.getElements("b:card[b:phone]")) {
r = r.plug("CARDS", [[
<h:li>
<h:b><{ c.getString("b:name") }></h:b>,
r = r.plug("CARDS", [[
<h:li>
<h:b><{ c.getString("b:name") }></h:b>,
phone: <{ c.getString("b:phone") }>
</h:li>
<[CARDS]>
phone: <{ c.getString("b:phone") }>
</h:li>
<[CARDS]>
;
}
return r.close();
;
}
return r.close();
10 / 23