InvalidXPathException

Gary Homewood's Avatar

Gary Homewood

12 Mar, 2010 12:37 PM via web

I have a task pipeline that is selecting some nodes with XPath. If I have an XPath of "/div/table" it works, but with "/div/table[2]", which is valid for the content, I get the following error:

org.dom4j.InvalidXPathException: org.dom4j.InvalidXPathException: Invalid XPath expression: '/div/table[2]'. Caused by: null

Any ideas?

  1. Support Staff 2 Posted by steven.murphy on 12 Mar, 2010 01:01 PM

    steven.murphy's Avatar

    Hi Gary,

    Could you post the code you are using as well as the source of the page you are trying to run it against? If it is a private page and you cannot post it publicly, feel free to send it to my email, ***@vamosa.com and I will take a look at it.

    Thanks

  2. 3 Posted by Gary Homewood on 12 Mar, 2010 04:52 PM

    Gary Homewood's Avatar

    Thanks for getting back to me, but it looks like I've managed to resolve it with a careful bit of refactoring.
    Cheers
    Gary Homewood

    -----Original Message-----
    From: steven.murphy [mailto:***@tenderapp.com]
    Sent: 12 March 2010 13:01
    To: Gary Homewood
    Subject: Re: InvalidXPathException [Scripting]

  3. Support Staff 4 Posted by Adrian Cockburn on 15 Mar, 2010 10:31 AM

    Adrian Cockburn's Avatar

    Marking as Resolved

  4. Adrian Cockburn closed this discussion on 15 Mar, 2010 10:31 AM.

Comments are currently closed for this discussion. You can start a new one.