probe.setResult(new StreamResult(writer));
probe.startDocument();
probe.startPrefixMapping("p", "uri");
probe.startElement("uri", "e", "p:e", new AttributesImpl());
probe.endElement("uri", "e", "p:e");
probe.endPrefixMapping("p");
probe.endDocument();
if (writer.toString().indexOf("xmlns") == -1) {
// The serializer does not output xmlns declarations,
// so we need to do it explicitly with this wrapper
return new SerializingContentHandler(handler);