parent.addComment(pp.getText());
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
((Element) current).addComment(node.getNodeValue()); } else { ((Document) current).addComment(node.getNodeValue());
public Element addComment(String text) { return element.addComment( text ); }
public Element addComment(String text) { return element.addComment( text ); }
public Element addComment(String text) { return element.addComment( text ); }
public Element addComment(String text) { return element.addComment( text ); }
public Element addComment(String text) { return target().addComment( text ); }
public Element addComment(String text) { return target().addComment( text ); }
public Element addComment(String text) { return target().addComment( text ); }
public Element addComment(String text) { return target().addComment( text ); }
parent.addComment(pp.getText()); } else { document.addComment(pp.getText());
/** * @see org.opencms.xml.types.I_CmsXmlSchemaType#generateXml(org.opencms.file.CmsObject, org.opencms.xml.I_CmsXmlDocument, org.dom4j.Element, java.util.Locale) */ @Override public Element generateXml(CmsObject cms, I_CmsXmlDocument document, Element root, Locale locale) { Element element = root.addElement(getName()); element.addComment("Categories are read dynamically"); return element; }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void comment(char[] ch, int start, int end) throws SAXException { if (!ignoreComments) { if (mergeAdjacentText && textInTextBuffer) { completeCurrentTextNode(); } String text = new String(ch, start, end); if (!insideDTDSection && (text.length() > 0)) { if (currentElement != null) { currentElement.addComment(text); } else { getDocument().addComment(text); } } } }
public void testPrettyPrinting() throws Exception { Document doc = DocumentFactory.getInstance().createDocument(); doc.addElement("summary").addAttribute("date", "6/7/8").addElement( "orderline").addText("puffins").addElement("ranjit") .addComment("Ranjit is a happy Puffin"); XMLWriter writer = new XMLWriter(System.out, OutputFormat .createPrettyPrint()); writer.write(doc); doc = DocumentFactory.getInstance().createDocument(); doc.addElement("summary").addAttribute("date", "6/7/8").addElement( "orderline").addText("puffins").addElement("ranjit") .addComment("Ranjit is a happy Puffin").addComment( "another comment").addElement("anotherElement"); writer.write(doc); }