/** * Exports the given node by preparing the export and calling the * abstract {@link #exportNode(String, String, Node)} method to give * control of the export format to a subclass. * <p> * This method should be called only once for an exporter instance. * * @param node node to be exported * @throws SAXException if a SAX error occurs * @throws RepositoryException if a repository error occurs */ public void export(Node node) throws RepositoryException, SAXException { handler.startDocument(); String[] prefixes = session.getNamespacePrefixes(); for (int i = 0; i < prefixes.length; i++) { if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) { addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i])); } } exportNode(node); handler.endDocument(); }
/** * Exports the given node by preparing the export and calling the * abstract {@link #exportNode(String, String, Node)} method to give * control of the export format to a subclass. * <p> * This method should be called only once for an exporter instance. * * @param node node to be exported * @throws SAXException if a SAX error occurs * @throws RepositoryException if a repository error occurs */ public void export(Node node) throws RepositoryException, SAXException { handler.startDocument(); String[] prefixes = session.getNamespacePrefixes(); for (int i = 0; i < prefixes.length; i++) { if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) { addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i])); } } exportNode(node); handler.endDocument(); }
/** * Exports the given node by preparing the export and calling the * abstract {@link #exportNode(String, String, Node)} method to give * control of the export format to a subclass. * <p> * This method should be called only once for an exporter instance. * * @param node node to be exported * @throws SAXException if a SAX error occurs * @throws RepositoryException if a repository error occurs */ public void export(Node node) throws RepositoryException, SAXException { handler.startDocument(); String[] prefixes = session.getNamespacePrefixes(); for (int i = 0; i < prefixes.length; i++) { if (prefixes[i].length() > 0 && !prefixes[i].equals("xml") ) { addNamespace(prefixes[i], session.getNamespaceURI(prefixes[i])); } } exportNode(node); handler.endDocument(); }