Contains method() in DOM

Results 1 to 2 of 2

Thread: Contains method() in DOM

  1. #1
    Join Date
    Dec 1969

    Default Contains method() in DOM

    Hi I want to match a word from an XML file , If I found that I have to display it on ASP page.So I used SelectNodes and displayed the exact matches from XML file.But now I want to display the values of Nodes in XML file which contains(even it is not an exact match) my word.<BR><BR>XML file is :<BR>&#060;Logins&#062;<BR> &#060;LoginWord&#062;exampleword1&#060;/loginWord&#062;<BR> &#060;LoginWord&#062;exampleword2&#060;/loginWord&#062;<BR> &#060;LoginWord&#062;exampleword3&#060;/loginWord&#062;<BR>&#060;/Logins&#062;<BR>I used following code to filter:<BR>Set objNode = objXML.SelectSingleNode("rolodex/contact<BR> [field/field_value=&#039;" & strLogin & "&#039;]")<BR>For ex: if strLogin="exampleword1" , then it selects first node.<BR>But even if I gave "example" as StrLogin value, then it should recognise.That means it should not work for only exact matches.<BR>So that I used Contains method, but it&#039;s failing .Can anyone give me exact syntax of Contains method? or if you have any code bit, please give me.<BR>Thanks,

  2. #2
    Join Date
    Dec 1969

    Default RE: Contains method() in DOM

    how are you using the method?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts