posted 18 years ago
One of your chained method calls was returning null.
Use this instead:
Then you can do your check on whether cod_user is null.
Generally, a good programming practice when receiving a null pointer exception in a situation like this is to separate all the method calls on to distinct lines, since the NPE could be caused by any of these methods operating on a null object returned by the previous method call.
e.g. the getFirstChild method here is returning null, so getNodeValue fails
by splitting this into several lines like follows, it would have been easy to find your problem:
[ July 24, 2005: Message edited by: DW Bolton ]