Help with XML error

From: Rowan <rowan@xxx.ky>
Date: Tue Apr 02 2002 - 10:20:30 PST

I'm pulling my hair out on this one -- it was working perfectly, and suddenly it's giving me this error! I'm parsing an XML doc and finding a certain node based on values that the user has submitted. Here's the line of code that's triggering the error:

Element thisProduct = (Element)XPath.find("//product[@id='"+ codes.get(i) = "']", doc);

It's part of a for loop where I'm looping through the array of responses (codes).

And here's the error:
java.lang.NullPointerException
        at com.caucho.xpath.Pattern.find(Pattern.java:86)
        at com.caucho.xpath.XPath.find(XPath.java:106)
        at _checkorder__jsp._jspService(/checkorder.jsp:52)
        at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
        at com.caucho.jsp.Page.subservice(Page.java:485)
        at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:181)
        at com.caucho.server.http.Invocation.service(Invocation.java:291)
        at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:341)
        at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:271)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:136)
        at java.lang.Thread.run(Thread.java:484)

Any help is much appreciated.

Thanks,
Rowan

_____________________________________________________________
Get your Free, Permanent, and Private Email Today!
---------- www.email.ky -----------

_____________________________________________________________
Run a small business? Then you need professional email like you@xxx.com from Everyone.net http://www.everyone.net?tag
Received on Tue 02 Apr 2002 10:20:30 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT