我下载了名为standard的文件,并从以下网站Link to file
将其重命名为auction.xml我写了一个插入查询并存储在一个名为insertqz.xq
的文件中for $doc in doc('auction.xml')/site/open_auctions//bidder/increase
return insert node <watch open_auction='open_auction5104'/> before $doc
并运行以下命令:zorba -t -q insertqz.xq
我收到以下错误:(no URI):1,2: dynamic error [err:XPDY0002]: "context item": undeclared variable
有人能帮助我吗?
答案 0 :(得分:0)
删除-q
<?php foreach($products as $product){
echo "<pre>"; print_r($product); // line 1
?>
<tr>// line 2
<td align="center"><?php echo $product->name ?></td>
<td align="center"><?php echo $product->sku ?></td>
<td align="center"><?php echo $product->status ?></td>
<td align="center"><?php echo $product->date_time ?></td>
<td align="center">Edit / Delete</td>
</tr>
<?php } exit;?>
打印更新的xml文件:
zorba -t insertqz.xq