code: public static void outputResultTreeFragment(
          SerializationHandler handler,
          XObject obj,
          XPathContext support)
          throws org.xml.sax.SAXException
      {
  
          int doc = obj.rtf();
          DTM dtm = support.getDTM(doc);
  
          if (null != dtm)
          {
              for (int n = dtm.getFirstChild(doc);
                  DTM.NULL != n;
                  n = dtm.getNextSibling(n))
              {
                  handler.flushPending();
  
                  // I think. . . . This used to have a (true) arg
                  // to flush prefixes, will that cause problems ???
                  if (dtm.getNodeType(n) == DTM.ELEMENT_NODE
                          && dtm.getNamespaceURI(n) == null)
                      handler.startPrefixMapping("", "");
                  dtm.dispatchToEvents(n, handler);
              }
          }
      }
docs: Given a result tree fragment, walk the tree and
  output it to the SerializationHandler.
  
  @param obj Result tree fragment object
  @param support XPath context for the result tree fragment
  
  @throws org.xml.sax.SAXException