@Override protected void commentInternal(String comment) throws XMLStreamException { this.streamWriter.writeComment(comment); }
@Override protected void commentInternal(String comment) throws XMLStreamException { this.streamWriter.writeComment(comment); }
public void writeComment(String data) throws XMLStreamException { writer.writeComment(data); }
@Override public void writeComment(String data) throws XMLStreamException { fq(); underlying.writeComment(data); }
@Override public void beforeMarshal(Object source) { if (Docx4jProperties.getProperty("docx4j.jaxb.marshal.suppressVersionComment", false)==false) { try { if (source instanceof org.docx4j.wml.Body) { xsw.writeComment(Version.getPoweredBy(isNewPkg)); } } catch(XMLStreamException e) { log.error(e.getMessage(), e); } } }
@Override public void writeComment(final String data) throws XMLStreamException { newline(); indent(); delegate.writeComment(data); state = COMMENT; }
wr.writeComment( rd.getText() ); wasSomething = true; break;
break; case XMLEvent.COMMENT: writer.writeComment(xmlr.getText()); break; case XMLEvent.ENTITY_REFERENCE:
@Override public void writeComment(String theData) throws XMLStreamException { myTarget.writeComment(theData); }
public void writeComment(String data) throws XMLStreamException { writer.writeComment(data); }
public void writeComment(String arg0) throws XMLStreamException { underlyingWriter.writeComment(arg0); }
public void writeComment(String data) throws XMLStreamException { writer.writeComment(data); }
public void beforeMarshal(Object source) { try { xsw.writeComment("Before: " + source.toString()); } catch(XMLStreamException e) { public void afterMarshal(Object source) { try { xsw.writeComment("After: " + source.toString()); } catch(XMLStreamException e) {
@Override public void writeComment(String theData) throws XMLStreamException { indent(); myTarget.writeComment(theData); }
/** * This will handle printing of a {@link Comment}. * * @param out * <code>XMLStreamWriter</code> to use. * @param fstack * the FormatStack * @param comment * <code>Comment</code> to write. * @throws XMLStreamException * if the destination XMLStreamWriter fails */ protected void printComment(final XMLStreamWriter out, final FormatStack fstack, final Comment comment) throws XMLStreamException { out.writeComment(comment.getText()); }
private void writeCommentsPost(XMLStreamWriter theEventWriter, IBase theElement) throws XMLStreamException { if (theElement != null && theElement.hasFormatComment()) { for (String next : theElement.getFormatCommentsPost()) { if (isNotBlank(next)) { theEventWriter.writeComment(next); } } } }
private void writeCommentsPre(XMLStreamWriter theEventWriter, IBase theElement) throws XMLStreamException { if (theElement != null && theElement.hasFormatComment()) { for (String next : theElement.getFormatCommentsPre()) { if (isNotBlank(next)) { theEventWriter.writeComment(next); } } } }
xtw.writeStartDocument("UTF-8", "1.0"); xtw.writeStartElement("root"); xtw.writeComment("This is an attempt to create an XML file with StAX");
xsw.writeComment(xsr.getText()); break;
/** * @param xmlNode XML node * @param xmlStreamWriter XML stream writer * @throws XMLStreamException the XML stream exception */ public static void writeNode(Node xmlNode, XMLStreamWriter xmlStreamWriter) throws XMLStreamException { if (xmlNode instanceof Element) { addElement((Element) xmlNode, xmlStreamWriter); } else if (xmlNode instanceof Text) { xmlStreamWriter.writeCharacters(xmlNode.getNodeValue()); } else if (xmlNode instanceof CDATASection) { xmlStreamWriter.writeCData(((CDATASection) xmlNode).getData()); } else if (xmlNode instanceof Comment) { xmlStreamWriter.writeComment(((Comment) xmlNode).getData()); } else if (xmlNode instanceof EntityReference) { xmlStreamWriter.writeEntityRef(xmlNode.getNodeValue()); } else if (xmlNode instanceof ProcessingInstruction) { ProcessingInstruction procInst = (ProcessingInstruction) xmlNode; xmlStreamWriter.writeProcessingInstruction(procInst.getTarget(), procInst.getData()); } else if (xmlNode instanceof Document) { writeToDocument((Document) xmlNode, xmlStreamWriter); } }