Find count of a string in an xml fileMudita Nain muditanain at hotmail.com
Wed Jun 4 10:20:48 PDT 2008
Hi all, I am using SQL Server 2005. I have a table with xml column in which I have loaded an XML file. I want to write an xquery which finds the number of occurrences of a string in the document in some defined tags. The structure of the document is as follows: <subject><displaySubject = "Day"><alt> </alt><alt> </alt><alt> </alt><alt> </alt></displaySubject></subject><subject><displaySubject><alt> </alt><alt> </alt><alt> </alt><alt> </alt></displaySubject></subject> So, I want to find how many time the string "Day" occurs whether in displaySubject or alt anywhere in the document.Also, the "Day" string is not known. I want to find all the strings that occur more than 50 times in the document. I hope I am clear.I would appreciate any help from you. ThanksMudita _________________________________________________________________ Instantly invite friends from Facebook and other social networks to join you on Windows Live™ Messenger. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends -------------- next part -------------- An HTML attachment was scrubbed... URL: http://x-query.com/pipermail/talk/attachments/20080604/6e1e36a9/attachment.htm
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format