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.
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.