cursor = xmlObject.newCursor();
while (cursor.currentTokenType() != TokenType.START && cursor.currentTokenType() != TokenType.ENDDOC) {
cursor.toNextToken();
}
if (cursor.currentTokenType() == TokenType.START) {
Map<?, ?> nsMap = new HashMap<Object, Object>();
cursor.getAllNamespaces(nsMap);
nsMap.remove(cursor.getDomNode().getPrefix());