@Override public String getText() { if (this.event.isCharacters()) { return this.event.asCharacters().getData(); } else if (this.event.getEventType() == XMLEvent.COMMENT) { return ((Comment) this.event).getText(); } else { throw new IllegalStateException(); } }
private void handleComment(Comment comment) throws SAXException { if (getLexicalHandler() != null) { char[] ch = comment.getText().toCharArray(); getLexicalHandler().comment(ch, 0, ch.length); } }
@Override public String getText() { if (this.event.isCharacters()) { return this.event.asCharacters().getData(); } else if (this.event.getEventType() == XMLEvent.COMMENT) { return ((Comment) this.event).getText(); } else { throw new IllegalStateException(); } }
private void handleComment(Comment comment) throws SAXException { if (getLexicalHandler() != null) { char[] ch = comment.getText().toCharArray(); getLexicalHandler().comment(ch, 0, ch.length); } }
/** * Constructs a new DOM4J Comment from the provided StAX Comment event. * * @param comment * The Comment event from which to construct the new DOM4J * Comment. * * @return The Comment constructed from the provided Comment event. */ public org.dom4j.Comment createComment(Comment comment) { return factory.createComment(comment.getText()); }
public String getText() { if (event.isCharacters()) { return event.asCharacters().getData(); } else if (event.getEventType() == XMLEvent.COMMENT) { return ((Comment) event).getText(); } else { throw new IllegalStateException(); } }
private void handleComment(Comment comment) throws SAXException { if (getLexicalHandler() != null) { char[] ch = comment.getText().toCharArray(); getLexicalHandler().comment(ch, 0, ch.length); } }
break; case XMLStreamConstants.COMMENT: theEventWriter.writeComment(((Comment) event).getText()); break; case XMLStreamConstants.END_ELEMENT:
String commentText = comment.getText(); heldComments.add(commentText); break;
/** * Copy constructor. * * @param that The comment to copy. */ public CommentEvent(Comment that) { super(that); this.text = that.getText(); }
/** * Writes a {@link Comment} to the provided stream. * * @param comment The {@link Comment} to write. * @param writer The destination stream. * @throws XMLStreamException If an error occurs writing to the stream. */ public static final void writeComment(Comment comment, XMLStreamWriter writer) throws XMLStreamException { writer.writeComment(comment.getText()); }
public void addComment(Comment c) throws XMLStreamException { writer.writeComment(c.getText()); }
((javax.xml.stream.events.Comment)event).getText()); if (current == null) { document.addContent(comment);
private void handleComment(Comment comment) throws XMLStreamException { try { String text = comment.getText(); this.filter.comment(text.toCharArray(), 0, text.length()); } catch (SAXException e) { throw new XMLStreamException(e); } }
/** * Constructs a new DOM4J Comment from the provided StAX Comment event. * * @param comment * The Comment event from which to construct the new DOM4J * Comment. * * @return The Comment constructed from the provided Comment event. */ public org.dom4j.Comment createComment(Comment comment) { return factory.createComment(comment.getText()); }
/** * Constructs a new DOM4J Comment from the provided StAX Comment event. * * @param comment * The Comment event from which to construct the new DOM4J * Comment. * * @return The Comment constructed from the provided Comment event. */ public org.dom4j.Comment createComment(Comment comment) { return factory.createComment(comment.getText()); }
/** * Constructs a new DOM4J Comment from the provided StAX Comment event. * * @param comment * The Comment event from which to construct the new DOM4J * Comment. * * @return The Comment constructed from the provided Comment event. */ public org.dom4j.Comment createComment(Comment comment) { return factory.createComment(comment.getText()); }
private void handleComment(Comment comment) throws XMLStreamException { try { String text = comment.getText(); this.filter.comment(text.toCharArray(), 0, text.length()); } catch (SAXException e) { throw new XMLStreamException(e); } }
/** * Constructs a new DOM4J Comment from the provided StAX Comment event. * * @param comment * The Comment event from which to construct the new DOM4J * Comment. * * @return The Comment constructed from the provided Comment event. */ public org.dom4j.Comment createComment(Comment comment) { return factory.createComment(comment.getText()); }
private void handleComment(Comment comment) throws SAXException { if (getLexicalHandler() != null) { char[] ch = comment.getText().toCharArray(); getLexicalHandler().comment(ch, 0, ch.length); } }