XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
saishanker narayanSubject: Find Number of Records in XML File Using Stylus Studio
Author: saishanker narayan
Date: 29 Jun 2005 03:38 PM
Originally Posted: 29 Jun 2005 03:37 PM
I have a question.How can we see the total number od records in an xml file using Stylus studio.<br> e.g of xml file structure:-<br> <br> <file><br> <record1><br> </record1><br> <record2><br> </record2><br> <record3><br> </record3><br> </file><br> <br> As the above format has 3 records.<br> <br> Thanks, Sai

Posttop
Ivan PedruzziSubject: Find Number of Records in XML File Using Stylus Studio
Author: Ivan Pedruzzi
Date: 29 Jun 2005 04:02 PM
Asuming you don't have duplicates the following XPath expression counts all the elements under "file" with name that starts with "record"

count(/file/*[starts-with(local-name(), 'record')])

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.