我想使用XQUERY获取或返回xml文件中的项数(<recROw></recROw>
)。在XQuery中有什么简单的方法可以做到这一点吗?
下面是我的示例XML数据:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<DailyRecord>
<recROw>
<id>1</id>
<name>John Smith</name>
<gender>male</gender>
<status>active</status>
</recROw>
<recROw>
<id>2</id>
<name>James Bond</name>
<gender>male</gender>
<status>active</status>
</recROw>
<DailyRecord>
任何帮助和想法都将不胜感激。提前谢谢你!
发布于 2013-06-21 15:27:03
试一试
count(/DailyRecord/recROw)
https://stackoverflow.com/questions/17227663
复制相似问题