List of utility methods to do XML Transform
javax.xml.transform.Transformer | getTransformer() get Transformer if (s_transformer != null) { } else { try { s_transformer = getTransformerFactory().newTransformer(); s_transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2"); s_transformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT, "yes"); } catch (javax.xml.transform.TransformerConfigurationException tce) { throw new RuntimeException(tce); ... |
Transformer | getTransformer() get Transformer if (transformer == null) { try { transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); } catch (Exception e) { e.printStackTrace(); return null; return transformer; |
Transformer | getTransformer() get Transformer return getTransformerFactory().newTransformer();
|
Transformer | getTransformer() get Transformer TransformerFactory tf; try { tf = TransformerFactory.newInstance(); } catch (TransformerFactoryConfigurationError e) { System.setProperty("javax.xml.transform.TransformerFactory", TRANSFORMER_FACTORY_JDK5); tf = TransformerFactory.newInstance(); if (tf != null) { ... |
Transformer | getTransformer() get Transformer Transformer transformer = null; try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformer = transformerFactory.newTransformer(); } catch (Exception exception) { exception.printStackTrace(); return transformer; ... |
Transformer | getTransformer() get Transformer Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(OutputKeys.METHOD, "xml"); return transformer; |
Transformer | getTransformer(boolean omitXmlDeclaration, String xslURL) Get a thread-safe Transformer. return getTransformer(omitXmlDeclaration, true, xslURL);
|
Transformer | getTransformer(boolean standalone, boolean indent, int indentNumber, boolean omitXmlDeclaration) get Transformer TransformerFactory f = TransformerFactory.newInstance(); f.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); if (indent) { f.setAttribute("indent-number", indentNumber); Transformer t = f.newTransformer(); if (standalone) { t.setOutputProperty(OutputKeys.STANDALONE, "yes"); ... |
Transformer | getTransformer(final InputStream xsl) get Transformer return TransformerFactory.newInstance().newTransformer(new StreamSource(xsl)); |
Transformer | getTransformer(Source xsltSource) Gets a new instance from a Transformer object. return TRANSFORMER_FACTORY.newTransformer(xsltSource);
|