Class TextExtractingXmlFragmentEventReader
- java.lang.Object
-
- com.atlassian.confluence.content.render.xhtml.ForwardingXmlEventReader
-
- com.atlassian.confluence.content.render.xhtml.TextExtractingXmlFragmentEventReader
-
- All Implemented Interfaces:
Iterator<Object>
,XMLEventReader
public class TextExtractingXmlFragmentEventReader extends ForwardingXmlEventReader
Class wraps another {code}XmlEventReader{code} to extract text from the XML that has been read.
-
-
Field Summary
-
Fields inherited from class com.atlassian.confluence.content.render.xhtml.ForwardingXmlEventReader
delegate
-
-
Constructor Summary
Constructors Constructor Description TextExtractingXmlFragmentEventReader(XMLEventReader xmlEventReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getText()
Returns the text with XML entities resolved.XMLEvent
nextEvent()
-
Methods inherited from class com.atlassian.confluence.content.render.xhtml.ForwardingXmlEventReader
close, getElementText, getProperty, hasNext, next, nextTag, peek, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
TextExtractingXmlFragmentEventReader
public TextExtractingXmlFragmentEventReader(XMLEventReader xmlEventReader) throws XMLStreamException
- Throws:
XMLStreamException
-
-
Method Detail
-
nextEvent
public XMLEvent nextEvent() throws XMLStreamException
- Specified by:
nextEvent
in interfaceXMLEventReader
- Overrides:
nextEvent
in classForwardingXmlEventReader
- Throws:
XMLStreamException
-
getText
public String getText()
Returns the text with XML entities resolved. If you plan to use this text to produce XML output make sure you use an api (such as Stax or DOM) that will escape any entities again to avoid introducing an XSS exploit.- Returns:
- the text.
-
-