@Override public boolean isIgnoringComments () { return _WrappedFactory.isIgnoringComments (); }
@Override public boolean isIgnoringComments () { return _WrappedFactory.isIgnoringComments (); }
public boolean isIgnoringComments() { return core.isIgnoringComments(); } public boolean isIgnoringElementContentWhitespace() {
@Override public boolean isIgnoringComments() { return factory.isIgnoringComments(); }
public boolean isIgnoringComments() { return core.isIgnoringComments(); } public boolean isIgnoringElementContentWhitespace() {
public boolean isIgnoringComments() { return actual.isIgnoringComments(); }
@Override public boolean isIgnoringComments() { return factory.isIgnoringComments(); }
public boolean isIgnoringComments() { return core.isIgnoringComments(); } public boolean isIgnoringElementContentWhitespace() {
@Override public boolean isIgnoringComments() { return factory.isIgnoringComments(); }
public boolean isIgnoringComments() { return base.isIgnoringComments(); }
public boolean isIgnoringComments() { return core.isIgnoringComments(); } public boolean isIgnoringElementContentWhitespace() {
public boolean isIgnoringComments() { return _WrappedFactory.isIgnoringComments(); } public boolean isIgnoringElementContentWhitespace()
public boolean isIgnoringComments() { return _WrappedFactory.isIgnoringComments(); }
static private void showFactoryInfo(DocumentBuilderFactory factory) { System.out.println("------------------------"); System.out.println("DocumentBuilderFactory class= "+factory.getClass().getName()); try { //ClassLoader cl = factory.getClass().getClassLoader(); //Class version = cl.loadClass("org.apache.xerces.impl.Version"); Class version = Class.forName("org.apache.xerces.impl.Version"); Method m = version.getMethod("getVersion", (Class []) null); System.out.println(" org.apache.xerces.impl.Version.version()="+m.invoke(null, (Object []) null)); //thredds.util.reflect.ProxyGenerator.showMethods( factory.getClass(), System.out); } catch (Exception e) { e.printStackTrace(); } System.out.println(); System.out.println(" factory.isValidating()="+factory.isValidating()); System.out.println(" factory.isNamespaceAware()="+factory.isNamespaceAware()); System.out.println(" factory.isIgnoringElementContentWhitespace()="+factory.isIgnoringElementContentWhitespace()); System.out.println(" factory.isExpandEntityReferences()="+factory.isExpandEntityReferences()); System.out.println(" factory.isIgnoringComments()="+factory.isIgnoringComments()); System.out.println(" factory.isCoalescing()="+factory.isCoalescing()); }
static private void showFactoryInfo(DocumentBuilderFactory factory) { System.out.println("------------------------"); System.out.println("DocumentBuilderFactory class= "+factory.getClass().getName()); try { //ClassLoader cl = factory.getClass().getClassLoader(); //Class version = cl.loadClass("org.apache.xerces.impl.Version"); Class version = Class.forName("org.apache.xerces.impl.Version"); Method m = version.getMethod("getVersion", (Class []) null); System.out.println(" org.apache.xerces.impl.Version.version()="+m.invoke(null, (Object []) null)); //thredds.util.reflect.ProxyGenerator.showMethods( factory.getClass(), System.out); } catch (Exception e) { e.printStackTrace(); } System.out.println(); System.out.println(" factory.isValidating()="+factory.isValidating()); System.out.println(" factory.isNamespaceAware()="+factory.isNamespaceAware()); System.out.println(" factory.isIgnoringElementContentWhitespace()="+factory.isIgnoringElementContentWhitespace()); System.out.println(" factory.isExpandEntityReferences()="+factory.isExpandEntityReferences()); System.out.println(" factory.isIgnoringComments()="+factory.isIgnoringComments()); System.out.println(" factory.isCoalescing()="+factory.isCoalescing()); }
static private void showFactoryInfo(DocumentBuilderFactory factory) { System.out.println("------------------------"); System.out.println("DocumentBuilderFactory class= "+factory.getClass().getName()); try { //ClassLoader cl = factory.getClass().getClassLoader(); //Class version = cl.loadClass("org.apache.xerces.impl.Version"); Class version = Class.forName("org.apache.xerces.impl.Version"); Method m = version.getMethod("getVersion", (Class []) null); System.out.println(" org.apache.xerces.impl.Version.version()="+m.invoke(null, (Object []) null)); //thredds.util.reflect.ProxyGenerator.showMethods( factory.getClass(), System.out); } catch (Exception e) { e.printStackTrace(); } System.out.println(); System.out.println(" factory.isValidating()="+factory.isValidating()); System.out.println(" factory.isNamespaceAware()="+factory.isNamespaceAware()); System.out.println(" factory.isIgnoringElementContentWhitespace()="+factory.isIgnoringElementContentWhitespace()); System.out.println(" factory.isExpandEntityReferences()="+factory.isExpandEntityReferences()); System.out.println(" factory.isIgnoringComments()="+factory.isIgnoringComments()); System.out.println(" factory.isCoalescing()="+factory.isCoalescing()); }
/** * Creates a Document from XML String * * @param xml * The XML String * @return The Document representation */ public static Document toDocument(String xml) { try { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory .newInstance(); documentBuilderFactory.setNamespaceAware(true); documentBuilderFactory.setIgnoringElementContentWhitespace(true); documentBuilderFactory.isIgnoringComments(); documentBuilderFactory.setCoalescing(true); DocumentBuilder documentBuilder = documentBuilderFactory .newDocumentBuilder(); InputSource inputSource = new InputSource(); inputSource.setCharacterStream(new StringReader(xml)); Document document = documentBuilder.parse(inputSource); removeUnusedNamespaces(document); return document; } catch (ParserConfigurationException e) { throw new RuntimeException(e); } catch (SAXException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } }
public boolean isIgnoringComments () { return this.impl.isIgnoringComments (); } public boolean isIgnoringElementContentWhitespace () { return this.impl.isIgnoringElementContentWhitespace(); } public boolean isNamespaceAware () { return this.impl.isNamespaceAware (); }
/** * Sets the configuration for a document builder. */ public void setConfig(DocumentBuilderFactory factory) { if (_builder == null) _builder = new DOMBuilder(); _isCoalescing = factory.isCoalescing(); setExpandEntities(factory.isExpandEntityReferences()); setSkipComments(factory.isIgnoringComments()); setSkipWhitespace(factory.isIgnoringElementContentWhitespace()); setNamespaceAware(factory.isNamespaceAware()); setNamespacePrefixes(false); setValidating(factory.isValidating()); }
/** * Sets the configuration for a document builder. */ public void setConfig(DocumentBuilderFactory factory) { if (_builder == null) _builder = new DOMBuilder(); _isCoalescing = factory.isCoalescing(); setExpandEntities(factory.isExpandEntityReferences()); setSkipComments(factory.isIgnoringComments()); setSkipWhitespace(factory.isIgnoringElementContentWhitespace()); setNamespaceAware(factory.isNamespaceAware()); setNamespacePrefixes(false); setValidating(factory.isValidating()); }