public CDATA cdata(String str) { CDATA c = new CDATA(); c.value = str; return c; }
public CDATA cdata(String text) { return new CDATA(text); }
public void writeCData(String data) throws XMLStreamException { currentNode.addContent(new CDATA(data)); }
public void writeCData(String data) throws XMLStreamException { currentNode.addContent(new CDATA(data)); }
public void writeCData(String data) throws XMLStreamException { currentNode.addContent(new CDATA(data)); }
public void writeCData(String text) throws IOException { this.currentElement.addContent(new CDATA(text)); }
protected Element generateCDATAElement(String name, String value) { Element element = new Element(name, CONTENT_NS); CDATA cdata = new CDATA(value); element.addContent(cdata); return element; }
protected Element generateCDATAElement(String name, String value) { Element element = new Element(name, CONTENT_NS); CDATA cdata = new CDATA(value); element.addContent(cdata); return element; }
List<Element> content = new ArrayList<Element>(); content.add(new Element("td").setText(current.getRank()); ... String cdataContent = new XMLOutputter().outputString(content); description.setContent(new CDATA(cdataContent));
public Element renderCDATAElement(Element parent, String elementName, String data) { Element element = null; if (data != null) { element = renderElement(parent, elementName); element.addContent(new CDATA(data)); } return element; }
protected Element createInstructions() { Element instructions = new Element("instructions"); instructions.setContent(new CDATA(getInstruction())); return instructions; }
private Element getLogElement(TestReportLog log) throws JDOMException, IOException { Element el = new Element("log"); el.addContent(getHtmlSummaryElement(log.getHtmlSummary())); Element systemLogEl = new Element("system-log"); systemLogEl.addContent(new CDATA(log.getSystemLog())); el.addContent(systemLogEl); return el; }
protected Element createInstructions(StructuredArtifactHomeInterface home) { Element instructions = new Element("instructions"); instructions.setContent(new CDATA(home.getInstruction())); return instructions; }
public static Document prepareCloseReviewSummaryNode(String message) { Element root = new Element("closeReviewSummary"); Document doc = new Document(root); if (message != null) { Element messageData = new Element("summary"); getContent(root).add(messageData); CDATA patchT = new CDATA(message); messageData.setContent(patchT); } return doc; }
public static Document prepareAddPatchNode(String repoName, String patch) { Element root = new Element("addPatch"); Document doc = new Document(root); addTag(root, "repository", repoName); if (patch != null) { Element patchData = new Element("patch"); getContent(root).add(patchData); CDATA patchT = new CDATA(patch); patchData.setContent(patchT); } return doc; }
public static Document prepareCreateReviewNode(Review review, String patch) { Element root = new Element("createReview"); Document doc = new Document(root); getContent(root).add(prepareReviewNodeElement(review)); if (patch != null) { Element patchData = new Element("patch"); getContent(root).add(patchData); CDATA patchT = new CDATA(patch); patchData.setContent(patchT); } return doc; }
private Element getHtmlSummaryElement(String html) throws JDOMException, IOException { Tidy tidy = new Tidy(); tidy.setForceOutput(true); tidy.setQuiet(true); tidy.setShowWarnings(false); tidy.setXHTML(true); tidy.setPrintBodyOnly(true); StringWriter tidiedHtml = new StringWriter(); tidy.parse(new StringReader(html), tidiedHtml); Element htmlSummaryEl = new Element("html-summary"); htmlSummaryEl.addContent(new CDATA(tidiedHtml.toString())); return htmlSummaryEl; } }
ContentModule contentModule = new ContentModuleImpl(); List<ContentItem> contents = new ArrayList<ContentItem>(); List<Content> contentValueDOM = new ArrayList<Content>(); String value = "<p>Some text here</p>"; ContentItem content = new ContentItem(); content.setContentValue(value); content.setContentAbout("Paragraph"); content.setContentFormat("http://www.w3.org/TR/html4/"); CDATA valueElement = new CDATA(value); contentValueDOM.add(valueElement); content.setContentValueDOM(contentValueDOM); contents.add(content); contentModule.setContents(contents); contentModule.setContentItems(contents); entry.getModules().add(contentModule);
private void setConfig(Element configElement) { if (null != this.getStaticItems()) { CDATA cdata = new CDATA(this.getStaticItems()); configElement.addContent(cdata); } if (null != this.getExtractorBeanName()) { configElement.setAttribute("extractorBean", this.getExtractorBeanName()); } if (null != this.getCustomSeparator()) { configElement.setAttribute("separator", this.getCustomSeparator()); } }
private void setConfig(Element configElement) { if (null != this.getStaticItems()) { CDATA cdata = new CDATA(this.getStaticItems()); configElement.addContent(cdata); } if (null != this.getExtractorBeanName()) { configElement.setAttribute("extractorBean", this.getExtractorBeanName()); } if (null != this.getCustomSeparator()) { configElement.setAttribute("separator", this.getCustomSeparator()); } }