/** * Write an XML document to the OutputStream provided. This will use the * pre-configured Roo provided Transformer. * * @param outputStream the output stream to write to. The stream is closed * upon completion. * @param document the document to write. */ public static void writeXml(final OutputStream outputStream, final Document document) { writeXml(createIndentingTransformer(), outputStream, document); }
XmlUtils.writeXml(outputStream, addModelObjectToFlow(inputStream, modelObject)); } else {
dependenciesElement.appendChild(dependencyAdvancedElement); XmlUtils.writeXml(fileManager.updateFile(pomRooAddonSuite).getOutputStream(), docXml);
"src/main/assembly/repo-assembly.xml")); XmlUtils.writeXml(assemblyFile.getOutputStream(), assemblyDoc);
XmlUtils.writeXml(transformer, byteArrayOutputStream, document); try { final File output = new File(f, "appendix-command-index.xml");
/** * Writes the given Maven POM to disk * * @param pom the POM to write (required) */ private void writePomFile(final Document pom, String folder) { MutableFile pomFile; if (folder != null) { LogicalPath rootPath = LogicalPath.getInstance(Path.ROOT, ""); pomFile = fileManager.createFile(pathResolver.getIdentifier(rootPath, folder + "/" + POM_XML)); } else { LogicalPath rootPath = LogicalPath.getInstance(Path.ROOT, ""); pomFile = fileManager.createFile(pathResolver.getIdentifier(rootPath, POM_XML)); } XmlUtils.writeXml(pomFile.getOutputStream(), pom); }
final OutputStream outputStream = file != null ? new FileOutputStream( file) : new ByteArrayOutputStream(); XmlUtils.writeXml(outputStream, document); LOGGER.info(file != null ? "Database metadata written to file " + file.getAbsolutePath()
/** * {@inheritDoc} */ public void addOrUpdateAxisClientService(String serviceName, Map<String, String> parameters) throws SAXException, IOException { createAxisClientConfigFile(); String axisClientPath = getAxisClientConfigPath(); Document document = XmlUtils.getDocumentBuilder().parse( new File(axisClientPath)); Element deployment = (Element) document.getFirstChild(); Element serviceElementDescriptor = getAxisClientService(document, serviceName, parameters); List<Element> previousServices = XmlUtils.findElements( "/deployment/service[@name='".concat(serviceName).concat("']"), deployment); if (previousServices.isEmpty()) { deployment.appendChild(serviceElementDescriptor); } else { deployment.replaceChild(serviceElementDescriptor, previousServices.get(0)); } OutputStream outputStream = new ByteArrayOutputStream(); Transformer transformer = XmlUtils.createIndentingTransformer(); XmlUtils.writeXml(transformer, outputStream, document); fileManager.createOrUpdateTextFileIfRequired(axisClientPath, outputStream.toString(), false); }
.build()); out = mutableLoginJspx.getOutputStream(); XmlUtils.writeXml(out, loginJspxDoc);
lastExceptionControlled); XmlUtils.writeXml(webXmlMutableFile.getOutputStream(), webXml);
XmlUtils.writeXml(persistenceMutableFile.getOutputStream(), persistenceXml);
.build()); out = mutableFooterJspx.getOutputStream(); XmlUtils.writeXml(out, footerJspxDoc);
sMapExcepResBean.setAttribute("id", "messageMappingExceptionResolverBean"); XmlUtils.writeXml(webXmlMutableFile.getOutputStream(), webXml);
XmlUtils.writeXml(pomMutableFile.getOutputStream(), pom);
XmlUtils.writeXml(pomMutableFile.getOutputStream(), pom);
XmlUtils.writeXml(docTagxMutableFile.getOutputStream(), docTagx);
XmlUtils.writeXml(file.getOutputStream(), web);
messageDigestPasswordEncoder); XmlUtils.writeXml(mutableConfigXml.getOutputStream(), webConfigDoc);