public String elementOutput(Element e) { return "\n\t" + new XMLOutputter().outputString(e); }
public String xmlRepresentation() { if (cachedXmlRepresentation == null) { cachedXmlRepresentation = new XMLOutputter().outputString(ccTrayXmlElement(SITE_URL_PREFIX)); } return cachedXmlRepresentation; }
/** * This returns a <code>String</code> representation of the * <code>DocType</code>, suitable for debugging. * * @return <code>String</code> - information about the * <code>DocType</code> */ @Override public String toString() { return new StringBuilder() .append("[DocType: ") .append(new org.jdom2.output.XMLOutputter().outputString(this)) .append("]") .toString(); }
/** * This returns a <code>String</code> representation of the * <code>ProcessingInstruction</code>, suitable for debugging. If the XML * representation of the <code>ProcessingInstruction</code> is desired, * {@link org.jdom2.output.XMLOutputter#outputString(ProcessingInstruction)} * should be used. * * @return <code>String</code> - information about the * <code>ProcessingInstruction</code> */ @Override public String toString() { return new StringBuilder() .append("[ProcessingInstruction: ") .append(new org.jdom2.output.XMLOutputter().outputString(this)) .append("]") .toString(); }
/** * This returns a <code>String</code> representation of the * <code>Comment</code>, suitable for debugging. If the XML * representation of the <code>Comment</code> is desired, * {@link org.jdom2.output.XMLOutputter#outputString(Comment)} * should be used. * * @return <code>String</code> - information about the * <code>Comment</code> */ @Override public String toString() { return new StringBuilder() .append("[Comment: ") .append(new org.jdom2.output.XMLOutputter().outputString(this)) .append("]") .toString(); }
/** * Gets the character stream for this input source. * <p> * Note that this method is only provided to make this * InputSource implementation acceptable by any XML * parser. As it generates an in-memory string representation * of the JDOM document, it is quite inefficient from both * speed and memory consumption points of view. * </p> * * @return a Reader to a string representation of the * source JDOM document. */ @Override public Reader getCharacterStream() { Reader reader = null; if (docsource != null) { // Get an in-memory string representation of the document // and return a reader on it. reader = new StringReader( new XMLOutputter().outputString(docsource)); } else if (listsource != null) { reader = new StringReader( new XMLOutputter().outputString(listsource)); } // Else: No source, no reader! return reader; } /**
String dtdDoc = new XMLOutputter().outputString(docType);
/** * Serializes the Element to a String. Allows to use a custom <tt>format</tt>. * * @param element the element to serialize. * @param format custom <tt>format</tt> used to serialize the Element. * @return the serialized Element. */ public static String serialize( Element element, Format format ) { XMLOutputter out = new XMLOutputter( format ); return out.outputString( element ); }
/** * Get the XML string of an XML Document object. * * @param document * @return String * @author zhangsa */ public static String getXmlString(Document document) { XMLOutputter xmlOutputter = new XMLOutputter(); return xmlOutputter.outputString(document); }
protected String getXmlInnerText(final Element e) { final StringBuffer sb = new StringBuffer(); final XMLOutputter xo = new XMLOutputter(); final List<Content> children = e.getContent(); sb.append(xo.outputString(children)); return sb.toString(); } }
protected String getXmlInnerText(final Element e) { final StringBuffer sb = new StringBuffer(); final XMLOutputter xo = new XMLOutputter(); final List<Content> children = e.getContent(); sb.append(xo.outputString(children)); return sb.toString(); } }
protected String getXmlInnerText(final Element e) { final StringBuffer sb = new StringBuffer(); final XMLOutputter xo = new XMLOutputter(); final List<Content> children = e.getContent(); sb.append(xo.outputString(children)); return sb.toString(); } }
/** * Write the information as an XML document * * @param doc write XML for this Document * @return String output */ public String writeXML(Document doc) { XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat()); return fmt.outputString(doc); }
/** * Write the information as an XML document * * @param doc write XML for this Document * @return String output */ public String writeXML(Document doc) { XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat()); return fmt.outputString(doc); }
/** * @return Formatted markup */ public String getMarkup() { if (!isValid()) { return null; } return new XMLOutputter(JDOM_FORMAT).outputString(this.content); }
private void writeConfigXML(java.util.Formatter sf) throws IOException { if (configResult != null) { PointConfigXML tcx = new PointConfigXML(); tcx.writeConfigXML(configResult, tc.getClass().getName(), sf); return; } XMLOutputter fmt = new XMLOutputter( Format.getPrettyFormat()); sf.format("%s", fmt.outputString ( makeDocument())); }
public String writeCapabilitiesReportAsString() throws WcsException { XMLOutputter xmlOutputter = new XMLOutputter( org.jdom2.output.Format.getPrettyFormat() ); return xmlOutputter.outputString( getCapabilitiesReport() ); }
/** * Write stationObsDataset XML document */ public String writeStationObsDatasetXML() { XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat()); return fmt.outputString(makeStationObsDatasetDocument()); }
/** * Write the XML representation to a String. * * @return the XML representation to a String. */ public String writeXML(Date lastModified) { XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat()); return fmt.outputString(writeDocument(lastModified)); }
/** * Returns a string containing the XML content of a KAFDocument object. */ static String kafToStr(KAFDocument kaf) { XMLOutputter out = new XMLOutputter(Format.getPrettyFormat().setLineSeparator(LineSeparator.UNIX)); // out.getFormat().setTextMode(Format.TextMode.PRESERVE); Document jdom = KAFToDOM(kaf); return out.outputString(jdom); }