/** * Creates the <code>DocumentFactory</code> used to create the DOM * tree. Override this method if you have to use another * implementation of the <code>DocumentFactory</code> (ie. for SVG, * you have to use the <code>SAXSVGDocumentFactory</code>). * * @param domImpl the DOM Implementation to use * @param parserClassname the XML parser classname */ protected DocumentFactory createDocumentFactory(DOMImplementation domImpl, String parserClassname) { return new SAXDocumentFactory(domImpl, parserClassname); }
/** * Creates a Document instance. * @param uri The document URI. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri) throws IOException { return createDocument(new InputSource(uri)); }
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ext.LexicalHandler#startCDATA()}. */ public void startCDATA() throws SAXException { appendStringData(); // Add any collected String Data before CData inCDATA = true; stringContent = true; // always create CDATA even if empty. }
appendStringData(); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); document = implementation.createDocument(nsURI, rawName, doctype); Iterator i = preInfo.iterator();
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { super.startDocument(); // Do not assume namespace declarations when no DTD has been specified. // namespaces.put("", SVGDOMImplementation.SVG_NAMESPACE_URI); // namespaces.put("xlink", XLinkSupport.XLINK_NAMESPACE_URI); }
appendStringData(); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); document = implementation.createDocument(nsURI, rawName, doctype); Iterator i = preInfo.iterator();
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { super.startDocument(); // Do not assume namespace declarations when no DTD has been specified. // namespaces.put("", SVGDOMImplementation.SVG_NAMESPACE_URI); // namespaces.put("xlink", XLinkSupport.XLINK_NAMESPACE_URI); }
/** * Creates a Document instance. * @param uri The document URI. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String uri) throws IOException { return createDocument(new InputSource(uri)); }
/** * Creates the <code>DocumentFactory</code> used to create the DOM * tree. Override this method if you have to use another * implementation of the <code>DocumentFactory</code> (ie. for SVG, * you have to use the <code>SAXSVGDocumentFactory</code>). * * @param domImpl the DOM Implementation to use * @param parserClassname the XML parser classname */ protected DocumentFactory createDocumentFactory(DOMImplementation domImpl, String parserClassname) { return new SAXDocumentFactory(domImpl, parserClassname); }
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ext.LexicalHandler#startCDATA()}. */ public void startCDATA() throws SAXException { appendStringData(); // Add any collected String Data before CData inCDATA = true; stringContent = true; // always create CDATA even if empty. }
appendStringData(); String nsURI = namespaces.get(nsp); if (currentNode == null) { implementation = getDOMImplementation(version); document = implementation.createDocument(nsURI, rawName, doctype); Iterator i = preInfo.iterator();
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ContentHandler#startDocument()}. */ public void startDocument() throws SAXException { super.startDocument(); // Do not assume namespace declarations when no DTD has been specified. // namespaces.put("", SVGDOMImplementation.SVG_NAMESPACE_URI); // namespaces.put("xlink", XLinkSupport.XLINK_NAMESPACE_URI); }
/** * Creates a Document instance. * @param ns The namespace URI of the root element of the document. * @param root The name of the root element of the document. * @param uri The document URI. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String ns, String root, String uri) throws IOException { return createDocument(ns, root, uri, new InputSource(uri)); }
BufferedReader r; r = new BufferedReader(new InputStreamReader(is, PREFERENCE_ENCODING)); DocumentFactory df = new SAXDocumentFactory (GenericDOMImplementation.getDOMImplementation(), xmlParserClassName);
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ext.LexicalHandler#endCDATA()}. */ public void endCDATA() throws SAXException { appendStringData(); // Add the CDATA section inCDATA = false; }
/** * Creates a Document instance. * @param ns The namespace URI of the root element of the document. * @param root The name of the root element of the document. * @param uri The document URI. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String ns, String root, String uri) throws IOException { return createDocument(ns, root, uri, new InputSource(uri)); }
BufferedReader r; r = new BufferedReader(new InputStreamReader(is, PREFERENCE_ENCODING)); DocumentFactory df = new SAXDocumentFactory (GenericDOMImplementation.getDOMImplementation(), xmlParserClassName);
/** * <b>SAX</b>: Implements {@link * org.xml.sax.ext.LexicalHandler#startCDATA()}. */ public void startCDATA() throws SAXException { appendStringData(); // Add any collected String Data before CData inCDATA = true; stringContent = true; // always create CDATA even if empty. }
/** * Creates a Document instance. * @param ns The namespace URI of the root element of the document. * @param root The name of the root element of the document. * @param uri The document URI. * @exception IOException if an error occured while reading the document. */ public Document createDocument(String ns, String root, String uri) throws IOException { return createDocument(ns, root, uri, new InputSource(uri)); }
SAXDocumentFactory df = new SAXDocumentFactory( doc.getImplementation(), XMLResourceDescriptor.getXMLParserClassName());