public Document parse( String systemId, XMLStreamReader parser, boolean root ) throws XMLStreamException { Document dom = documentBuilder.newDocument(); systemId = normalizeSystemId(systemId); if(root) rootDocuments.add(systemId); if(systemId==null) throw new IllegalArgumentException("system id cannot be null"); core.put( systemId, dom ); new XMLStreamReaderToContentHandler(parser,getParserHandler(dom),false,false).bridge(); return dom; }
public Document parse( String systemId, XMLStreamReader parser, boolean root ) throws XMLStreamException { Document dom = documentBuilder.newDocument(); systemId = normalizeSystemId(systemId); if(root) rootDocuments.add(systemId); if(systemId==null) throw new IllegalArgumentException("system id cannot be null"); core.put( systemId, dom ); new XMLStreamReaderToContentHandler(parser,getParserHandler(dom),false,false).bridge(); return dom; }
/** * Parses an XML at the given location ( * and XMLs referenced by it) into DOM trees * and stores them to this forest. * * @return the parsed DOM document object. */ public Document parse( String systemId, boolean root ) throws SAXException, IOException { systemId = normalizeSystemId(systemId); if( core.containsKey(systemId) ) // this document has already been parsed. Just ignore. return core.get(systemId); InputSource is=null; // allow entity resolver to find the actual byte stream. if( entityResolver!=null ) is = entityResolver.resolveEntity(null,systemId); if( is==null ) is = new InputSource(systemId); // but we still use the original system Id as the key. return parse( systemId, is, root ); }
/** * Parses an XML at the given location ( * and XMLs referenced by it) into DOM trees * and stores them to this forest. * * @return the parsed DOM document object. */ public Document parse( String systemId, boolean root ) throws SAXException, IOException { systemId = normalizeSystemId(systemId); if( core.containsKey(systemId) ) // this document has already been parsed. Just ignore. return core.get(systemId); InputSource is=null; // allow entity resolver to find the actual byte stream. if( entityResolver!=null ) is = entityResolver.resolveEntity(null,systemId); if( is==null ) is = new InputSource(systemId); // but we still use the original system Id as the key. return parse( systemId, is, root ); }
Document dom = documentBuilder.newDocument(); systemId = normalizeSystemId(systemId);
Document dom = documentBuilder.newDocument(); systemId = normalizeSystemId(systemId);