2012-10-23 64 views

回答

0

這可以使用XQuery腳本完成。考慮下面的XQuery模塊:

module namespace news-data = "http://www.news.org/data"; 

declare namespace an = "http://www.zorba-xquery.com/annotations"; 

declare collection news-data:employees as element(employee)*; 
declare variable $news-data:employees := xs:QName('news-data:employees'); 

您可以使用它像這樣:

import module namespace news-data = "http://www.news.org/data" at "news-data.xq"; 

import module namespace ddl = "http://www.zorba-xquery.com/modules/store/static/collections/ddl"; 
import module namespace dml = "http://www.zorba-xquery.com/modules/store/static/collections/dml"; 

ddl:create($news-data:employees); 
dml:insert-nodes($news-data:employees, doc("test2.xml")); 
相關問題