I have tried to get value attribute from the tag: My xml is: My method for getting value in Java is: But, my NodeList: nl.getLength() is 0. Could you please help somehow? Thank you in advance. Answer You need to tell your DocumentBuilderFactory to parse namespaces: