handler.startDocument();
handler.startPrefixMapping(prefix, uri);
handler.startElement(uri, "element", "element", XMLUtils.EMPTY_ATTRIBUTES);
handler.endElement(uri, "element", "element");
handler.endPrefixMapping(prefix);
handler.endDocument();
String text = writer.toString();
// Check if the namespace is there (replace " by ' to be sure of what we search in)
boolean needsIt = (text.replace('"', '\'').indexOf(check) == -1);