Mega Code Archive
Categories
/
XML
/
Xquery
Count nodes
File: Data.xml
book 1
book 2
book 3
File: Query.xquery
{ for $b in doc("Data.xml")/Books/Book return
{$b/text()}
}
Output:
book 1
book 2
book 3