I am using Xpath to find a list of strings in an HTML document. The strings appear when you type into a text box, to suggest possible results - in other words, it's auto-complete. The problem is, I'm trying to retrieve the whole list of auto-complete suggestions, the results are all split up by <strong> tags.
To give a couple examples: I start typing "str" and the HTML will look like this:
<strong>str</strong>ing
But it gets better! If I don't type anything at all, every single character in the auto-complete results will be interrupted with opening and closing strong tags. Like so:
s <strong></strong> t <strong></strong> r <strong></strong> i <strong></strong> n <strong></strong> g
So, my question is, how do I construct an xpath that retrieves this string, but omits the strong tags?
For reference, the hierarchy of the HTML looks like this:
-div
--ul
---li
----(string I'm looking for)
---li
----(another string I'm looking for)
So my xpath at this point is: //div[@class='class']/ul/li/text(), which will get me the individual parts of the strings.