> 2) Is the code above correct? > So, the NPE is because doc.getFirstChild() will return the comment.
It looks like this code is used within the context of extracting elements from an xml file we generate. So with the current geode code it will never see a comment, but it might still be worth just fixing the code to be more flexible. We do allow xml generating extensions to be registered, so this code could potentially cause NPEs if an extension generates xml with a comment. -Dan
