ottlinger commented on code in PR #233: URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1564259075
########## apache-rat-core/src/main/java/org/apache/rat/report/xml/writer/impl/base/XmlWriter.java: ########## @@ -525,24 +548,36 @@ private void writeAttributeContent(CharSequence content) throws IOException { */ @Override public IXmlWriter content(CharSequence content) throws IOException { - if (elementNames.isEmpty()) { - if (elementsWritten) { - throw new OperationNotAllowedException("Root element has already been closed."); - } - throw new OperationNotAllowedException("An element must be opened before content can be written."); - } - if (inElement) { - writer.write('>'); - } - writeBodyContent(content); + prepareForData(); + writeEscaped(content, false); inElement = false; return this; } - private void writeBodyContent(final CharSequence content) throws IOException { - writeEscaped(content, false); + + /** + * Writes content. Calling this method will automatically Note that this method + * does not use CDATA. + * + * @param content the content to write + * @return this object + * @throws OperationNotAllowedException if called before any call to + * {@link #openElement} or after the first element has been closed + */ + @Override + public IXmlWriter cdata(CharSequence content) throws IOException { Review Comment: Pls reformat this method - thx. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org