code: public void exportView( Node exportRootNode,
                              ContentHandler contentHandler,
                              boolean skipBinary,
                              boolean noRecurse ) throws RepositoryException, SAXException {
          assert exportRootNode != null;
          assert contentHandler != null;
          session.checkLive();
  
          // Export the namespace mappings used in this session
          NamespaceRegistry registry = session.getWorkspace().getNamespaceRegistry();
  
          startDocument(contentHandler);
          String[] namespacePrefixes = registry.getPrefixes();
          for (int i = 0; i < namespacePrefixes.length; i++) {
              String prefix = namespacePrefixes[i];
  
              if (!restrictedPrefixes.contains(prefix)) {
                  contentHandler.startPrefixMapping(prefix, registry.getURI(prefix));
              }
          }
  
          exportNode(exportRootNode, contentHandler, skipBinary, noRecurse);
  
          for (int i = 0; i < namespacePrefixes.length; i++) {
              if (!restrictedPrefixes.contains(namespacePrefixes[i])) {
                  contentHandler.endPrefixMapping(namespacePrefixes[i]);
              }
          }
  
          endDocument(contentHandler);
      }
docs: Exports <code>node</code> (or the subtree rooted at <code>node</code>) into an XML document by invoking SAX events on
  <code>contentHandler</code>.
  
  @param exportRootNode the node which should be exported. If <code>noRecursion</code> was set to <code>false</code> in the
  constructor, the entire subtree rooted at <code>node</code> will be exported.
  @param contentHandler the SAX content handler for which SAX events will be invoked as the XML document is created.
  @param skipBinary if <code>true</code>, indicates that binary properties should not be exported
  @param noRecurse if<code>true</code>, indicates that only the given node should be exported, otherwise a recursice export
  and not any of its child nodes.
  @throws SAXException if an exception occurs during generation of the XML document
  @throws RepositoryException if an exception occurs accessing the content repository