/** * Method for adding simple textual content to the xml output stream. Content added will be * escaped by the underlying stream, as necessary. * * <p>Will buffer content in cases where necessary (when content gets added to buffered container * that has not yet been released: the purposes of which is to allow out-of-order addition of * content). */ public void addCharacters(char[] buf, int offset, int len) throws XMLStreamException { if (_canOutputNewChild()) { _context.writeCharacters(buf, offset, len); } else { _linkNewChild(_context.createCharacters(buf, offset, len)); } }
/** * Method for adding simple textual content to the xml output stream. Content added will be * escaped by the underlying stream, as necessary. * * <p>Will buffer content in cases where necessary (when content gets added to buffered container * that has not yet been released: the purposes of which is to allow out-of-order addition of * content). */ public void addCharacters(String text) throws XMLStreamException { if (_canOutputNewChild()) { _context.writeCharacters(text); } else { _linkNewChild(_context.createCharacters(text)); } }