Finding an XPath to capture text without tags

I was having a hard time grabbing some text using XPath. The HTML in particular looked like this:

<br /><div>I like twertles</div>
   <br/></div> <p><code>This is my page: 345</code></p><p><code>
     <br />Last Downloaded: 10/13/2011</code></p>

All I wanted to snag was the date of the last download. As you can see, there is no obvious path to that value. BUT, what I do know is that there is a colon in there someplace. This looked like a job for substring-after. I was able to grab this value with this simple XPath:


Leave a comment