我想<recROw></recROw>使用XQUERY 获取或返回xml文件中item()的数量.在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>
Run Code Online (Sandbox Code Playgroud)
任何帮助和想法将不胜感激.先感谢您!
尝试
count(/DailyRecord/recROw)
Run Code Online (Sandbox Code Playgroud)