public void setSavePrettyPrint(boolean b) { if (b) super.setSavePrettyPrint(); else remove( SAVE_PRETTY_PRINT ); }
public static String indent(String xmldoc) throws IOException, XmlException { StringWriter sw = new StringWriter(); XmlObject doc = XmlObject.Factory.parse(xmldoc, (new XmlOptions()).setLoadLineNumbers()); doc.save(sw, new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(DEFAULT_INDENT)); sw.close(); return sw.getBuffer().toString(); } }
doc.save(System.out, new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(indent));
public final void writeCache() throws IOException { InputStream input = _importsDoc.newInputStream(new XmlOptions().setSavePrettyPrint()); writeInputStreamToFile(input, getIndexFilename()); }
/** * Returns default output options for outputting XmlObjects from XBeans. * * @return */ public static XmlOptions getDefaultXMLOptions() { XmlOptions opts= new XmlOptions(); opts.setSavePrettyPrint(); opts.setSavePrettyPrintIndent(INDENTION_SIZE); return opts; }
opts.setSaveOuter(); if (pretty) opts.setSavePrettyPrint();
protected XmlOptions getXmlOptions() { if (xmlOptions == null) { xmlOptions = new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(2); } return xmlOptions; }
System.out.println("----------------------\n\n" + schema); schema.save(new File(outDir, outPrefix + i + ".xsd"), new XmlOptions().setSavePrettyPrint());
@ApiModelProperty(hidden=true) public XmlOptions getXmlSaveOptions() { XmlOptions options = new XmlOptions(); options.setSavePrettyPrint(); options.setSaveAggressiveNamespaces(); options.setSavePrettyPrintIndent(2); return options; }
System.out.println("Cannot copy " + inputFile); else doc.save(outputFile, new XmlOptions().setSavePrettyPrint().setSaveAggresiveNamespaces()); doc.save(outputFile, new XmlOptions().setSavePrettyPrint().setSaveAggresiveNamespaces());
public String toXML() { Assert.notNull(dd); XmlOptions opts = new XmlOptions(); opts.setSavePrettyPrint(); //opts.s opts.setSavePrettyPrintIndent(4); opts.setUseDefaultNamespace(); return dd.xmlText(opts); //return dd.toString(); }
public String realToString(Object object) throws TranslationException { XmlObject xmlBean = (XmlObject) object; XmlOptions tempOptions = new XmlOptions(xmlOptions); tempOptions.setSavePrettyPrint(); return xmlBean.xmlText(tempOptions); }
public void save(File file) throws Exception { Assert.notNull(dd); XmlOptions opts = new XmlOptions(); opts.setSavePrettyPrint(); //opts.s opts.setSavePrettyPrintIndent(4); opts.setUseDefaultNamespace(); dd.save(file,opts); }
public void upgrade(InputStream source, Writer target) throws IOException, XmlException { XmlObject xmlObject = parse(source); xmlObject = upgrade(xmlObject); XmlOptions xmlOptions = new XmlOptions(); xmlOptions.setSavePrettyPrint(); xmlObject.save(target, xmlOptions); }
public void toXML(OutputStream outputStream) throws IOException { XmlOptions options = new XmlOptions(); options.setSavePrettyPrint(); options.setSavePrettyPrintIndent(4); options.setUseDefaultNamespace(); xmlObject.save(outputStream, options); }
public final void writeCache() throws IOException { InputStream input = _importsDoc.newInputStream(new XmlOptions().setSavePrettyPrint()); writeInputStreamToFile(input, getIndexFilename()); }
public void toXML(OutputStream outputStream) throws IOException { XmlOptions options = new XmlOptions(); options.setSavePrettyPrint(); options.setSavePrettyPrintIndent(4); options.setUseDefaultNamespace(); xmlObject.save(outputStream, options); }
/** * @return the default XmlOptions used in responses */ public static XmlOptions getXmlOptions() { return new XmlOptions() .setSaveNamespacesFirst() .setSaveSuggestedPrefixes(PREFIXES) .setSaveAggressiveNamespaces() .setSavePrettyPrint(); }
public String getAsText() { Environment environment = (Environment) getValue(); EnvironmentType environmentType = buildEnvironmentType(environment); XmlOptions xmlOptions = new XmlOptions(); xmlOptions.setSaveSyntheticDocumentElement(QNAME); xmlOptions.setSavePrettyPrint(); return environmentType.xmlText(xmlOptions); }
@Override public String getAsText() { JavabeanType javabeanType = getJavabeanType(getValue()); XmlOptions xmlOptions = new XmlOptions(); xmlOptions.setSaveSyntheticDocumentElement(QNAME); xmlOptions.setSavePrettyPrint(); return javabeanType.xmlText(xmlOptions); }