If critere.xml is :
<?xml version="1.0" encoding="ISO-8859-1"?>
<A>
<B crit="asd"/>
<A>
and the code is :
Document dataDOM = null;
DOMParser parser = new DOMParser();
parser.setIncludeIgnorableWhitespace(false);
parser.parse("critere.xml");
dataDOM = parser.getDocument();
String name = dataDOM.getFirstChild().getChildNodes().item(0).getNodeName()
then the value of name must be "B".
But the value is : "#text"