• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XSL 'like' operator

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write a search facility to query HTML that's held in an XML file.
I'm using ASP with the MSXMLDOM and would normally use code such as:
Set MyResults=xmldoc.documentElement.selectNodes("mynode [myelement $ieq$ '" & query & "']")

This would return all nodes that contain the word stored in the variable 'query'.
BUT...All the data is HTML and therefore if I try searching an element such as 'Title' for the word 'Hello' I don't get any results because the element actually contains the data '<h1>Hello</h1>'.
So essentially I need the equivalent of a 'like' or 'contains' operator.
I don't want to have to parse through each element and strip out the HTML as this would be very inefficient.
I also don't want to store a non-HTML version of the data.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex, where do you want to do search, on server or client side? When you said �to query HTML that's held in an XML file� � if transformation �XML to HTML� was performed on server side and you want to search on client side, I am afraid all what browser �see� is HTML. No way to access XML in this case.
If you want to search XML, you can either do it on server side before transformation, or you can send XML to browser and do transformation in browser. In this case browser have access to all XML data.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!