[摘要]'0';my item_total = quantity * cost;grand_total += item_total;# add the order quantity and ...
'0';
my $item_total = $quantity * $cost;
$grand_total += $item_total;
# add the order quantity and item totals to the tree.
$row->appendTextChild('quantity', $quantity);
$row->appendTextChild('item-total', $item_total);
}
最后,我们将增加一些有关订单的元信息,方法是在具有<order-total>元素的根元素中添加一个<instance-info>元素,该元素中包含有当前所选货物的总价值。
$grand_total
关键词:XML与现代CGI应用程序