以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XQuery/XLink/XPointer/ 』  (http://bbs.xml.org.cn/list.asp?boardid=14)
----  请教怎样在Berkeley dbxml中使用XQuery?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=17165)


--  作者:alexone
--  发布时间:4/19/2005 10:53:00 AM

--  请教怎样在Berkeley dbxml中使用XQuery?
// Get a query context
XmlQueryContext context = myManager->createQueryContext();
AfxMessageBox("begin query");
// Declare a namespace
context.setNamespace("fruits", "http://groceryItem.dbxml/fruits");

// Declare the query string. Find all the product documents
// in the fruits namespace.
std::string myQuery = "collection('myContainer.dbxml')/fruits";

// Perform the query.
XmlResults results = myManager->query(myQuery, context);
这是我的程序片断,敬请指正。


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
15.625ms