> I'm not sure what to think of this issue. The thing is that you are > trying to run an xpath-expression on an invalid XML document (valid XML > documents must have a root element!). I believe that an exception should > be thrown if you try to select nodes using xpath on such documents (but > not a NPE which is the case now).
Hi, the code was working fine for years, so I had no idea that my use case is invalid. The same method was called once on new empty document (create) and once for existing document (update), where the xpath test had meaning. Nonetheless thank you for your explanation. I will add some kind of check, so it will not happen. Though I agree with you, that NPE is not good exception to throw. Regards Leos -------------------- JSI RYCHLEJŠÍ, NEŽ SI MYSLÍŠ. WWW.NIKESPEED.COM http://user.centrum.cz/redir.php?url=http://www.nikespeed.com ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user