Getting a text inside a TAG via xpath and javascript in a html document
===

So, I'm trying to get the text inside of a tag in a list.

Let me say I have something like

    <div>text1</div>
    <div>text2</div>
    <div>text3</div>
    <div>text4</div>
    <div>text5</div>
    <div>text6</div>

so, I want to get the "number" of the DIV who matchs "text4" for example, so it will return a "4".
I cant modify the html, there is no class or ID in the divs.
Maybe I can get the innerHTML of a div? But how will I put all the divs inside a vector or something like that?

Thanks in advance