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