/** * * @return String return the String representation of this event. */ public String toString() { if(fIsCData) return "<![CDATA[" + getData() + "]]>"; else return fData; }
/** * * @return String return the String representation of this event. */ public String toString() { if(fIsCData) return "<![CDATA[" + getData() + "]]>"; else return fData; }
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. * No indentation or whitespace should be outputted. * * Any user defined event type SHALL have this method * called when being written to on an output stream. * Built in Event types MUST implement this method, * but implementations MAY choose not call these methods * for optimizations reasons when writing out built in * Events to an output stream. * The output generated MUST be equivalent in terms of the * infoset expressed. * * @param writer The writer that will output the data * @throws XMLStreamException if there is a fatal error writing the event */ protected void writeAsEncodedUnicodeEx(Writer writer) throws IOException { if (fIsCData) { writer.write("<![CDATA[" + getData() + "]]>"); } else { charEncode(writer, fData); } }
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. * No indentation or whitespace should be outputted. * * Any user defined event type SHALL have this method * called when being written to on an output stream. * Built in Event types MUST implement this method, * but implementations MAY choose not call these methods * for optimizations reasons when writing out built in * Events to an output stream. * The output generated MUST be equivalent in terms of the * infoset expressed. * * @param writer The writer that will output the data * @throws XMLStreamException if there is a fatal error writing the event */ protected void writeAsEncodedUnicodeEx(Writer writer) throws IOException { if (fIsCData) { writer.write("<![CDATA[" + getData() + "]]>"); } else { charEncode(writer, fData); } }