[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: IE msXML scripting Q on searach

Subject: RE: IE msXML scripting Q on searach
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Wed, 9 May 2001 08:31:15 +0100
searach
Walter,
If it works for you fine but just be aware that searchStr is a RegExp so you
could do
    if ( currNode.text.search("/" + searchStr + "/i") != -1)
    {
       ...
    }
or if you don't want to use RegExps
    if ( currNode.text.toLowerCase.indexOf(searchStr) != -1)
    {
       ...
    }

Ciao Chris

XML/XSL Portal
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Walter Torres
>Sent: 09 May 2001 02:45
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject:  IE msXML scripting Q on searach
>
>
>This is within IE 5.5, MSxml 3.1, trying to use JS to script actions for an
>xml file.
>
>I have this line...
>
>    if ( currNode.text.search(searchStr) != -1)
>    {
>       ...
>    }
>
>which looks in the given node to see if the passed in string (searchStr) is
>in this NODE.
>
>Works fine, but...
>
>How do I make this case-insensitive?
>
>Or, how do I force it to look at the NODE text in lower case, since I can
>force 'searchStr' to lower case?
>
>Thanks
>
>Walter
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.