The problem mentioned in the title occurs in using selectSingleNodes. I believe it has to do with xPath of the method. I denoted the problematic lines in the code below with &qu