java.lang.Object | |
↳ | com.atlassian.confluence.content.render.xhtml.StaxUtils |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Take a WstxLazyException as a parameter and return the appropriate XhtmlException for the Woodstox exception supplied.
| |||||||||||
Ensure all xml events that have been added to the event buffer of the writer are flushed.
| |||||||||||
Retrieves the value of the specified attribute name on the specified start element.
| |||||||||||
Retrieves the value of the specified attribute name on the specified start element.
| |||||||||||
Returns true if start element has all the specified attributes.
| |||||||||||
Read all characters and entities from the supplied reader until a non-character or non-entity event is read.
| |||||||||||
Take a String and split into multiple substrings where each substring is suitable to be written as CData. | |||||||||||
Removes control characters from a CharSequence so that it can be parsed by a Stax parser.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Take a WstxLazyException as a parameter and return the appropriate XhtmlException for the Woodstox exception supplied.
ex | the Woodstox exception to be converted to an XhtmlException. |
---|
Ensure all xml events that have been added to the event buffer of the writer are flushed.
You want to be using this instead of flush()
when:
eventWriter | the event writer |
---|
XMLStreamException |
---|
Retrieves the value of the specified attribute name on the specified start element.
startElement | start element |
---|---|
attributeQName | attribute QName |
Retrieves the value of the specified attribute name on the specified start element.
startElement | start element |
---|---|
attributeName | attribute name |
Returns true if start element has all the specified attributes.
startElement | start element |
---|---|
attributeNames | attribute names |
Read all characters and entities from the supplied reader until a non-character or non-entity event is read. At this point the stream will be left with the next event being this terminating event.
reader | the reader to read from, with the current event being either a character or an entity |
---|
XMLStreamException | if there are problems reading from the supplied reader |
---|
Take a String and split into multiple substrings where each substring is suitable to be written as CData.
You would use this method when you want to write CDATA to an XML document and you need to be sure that the content you are writing doesn't contain a CDATA closing triad (]]>) which would cause a premature closing of the CDATA.
So as an example if you supply a String like <![CDATA[stuff]]> then the returned Strings would be
If the supplied String is already safe for writing to a CDATA section then a single item List will be returned containing the supplied String.
data | the data to be made safe for writing to a CDATA section. |
---|
Removes control characters from a CharSequence so that it can be parsed by a Stax parser. The xml spec defines what characters an XML processor must accept:
Legal characters are tab, carriage return, line feed, and the legal characters of Unicode and ISO/IEC 10646http://www.w3.org/TR/REC-xml/#charsets This method only removes illegal control chars, and doesn't attempt to remove illegal Unicode characters.