Public Member Functions |
| FormatterToXMLUnicode (MemoryManager &theManager, Writer &writer, const XalanDOMString &encoding, const XalanDOMString &doctypeSystem=s_emptyString, const XalanDOMString &doctypePublic=s_emptyString, bool xmlDecl=true, const XalanDOMString &standalone=s_emptyString, size_type indent=eDefaultIndentAmount) |
| Constructor.
|
virtual | ~FormatterToXMLUnicode () |
Writer * | getWriter () const |
virtual void | endDocument () |
virtual void | startElement (const XMLCh *const name, AttributeList &attrs) |
virtual void | endElement (const XMLCh *const name) |
virtual void | charactersRaw (const XMLCh *const chars, const unsigned int length) |
| Receive notification of character data.
|
virtual void | entityReference (const XMLCh *const name) |
| Receive notification of a entityReference.
|
virtual void | comment (const XMLCh *const data) |
| Called when a Comment is to be constructed.
|
virtual const XalanDOMString & | getEncoding () const |
| XalanXMLSerializerBase (MemoryManager &theManager, eXMLVersion theXMLVersion, const XalanDOMString &theEncoding, const XalanDOMString &theDoctypeSystem, const XalanDOMString &theDoctypePublic, bool xmlDecl, const XalanDOMString &theStandalone) |
| Constructor.
|
virtual | ~XalanXMLSerializerBase () |
MemoryManagerType & | getMemoryManager () |
virtual void | setDocumentLocator (const Locator *const locator) |
virtual void | startDocument () |
virtual void | characters (const XMLCh *const chars, const unsigned int length) |
virtual void | ignorableWhitespace (const XMLCh *const chars, const unsigned int length) |
virtual void | processingInstruction (const XMLCh *const target, const XMLCh *const data) |
virtual void | resetDocument () |
virtual void | cdata (const XMLCh *const ch, const unsigned int length) |
| Receive notification of cdata.
|
virtual const XalanDOMString & | getDoctypeSystem () const |
virtual const XalanDOMString & | getDoctypePublic () const |
const XalanDOMString & | getVersion () const |
const XalanDOMString & | getStandalone () const |
bool | getShouldWriteXMLHeader () const |
void | setShouldWriteXMLHeader (bool b) |
| FormatterListener (eFormat theFormat) |
virtual | ~FormatterListener () |
eFormat | getOutputFormat () const |
| Get the output format for the instance.
|
eXMLVersion | getXMLVersion () const |
| Get the version of XML the FormatterListener is generating.
|
bool | isXML1_1Version () const |
| Determine if the version of XML output is 1.1.
|
const PrefixResolver * | getPrefixResolver () const |
| Get the PrefixResolver for the FormatterListener.
|
void | setPrefixResolver (const PrefixResolver *thePrefixResolver) |
| Set the PrefixResolver for the FormatterListener.
|
virtual const XalanDOMString & | getMediaType () const |
virtual int | getIndent () const |
Protected Member Functions |
virtual void | flushBuffer () |
void | writeXMLHeader () |
void | writeDoctypeDecl (const XalanDOMChar *name) |
void | writeProcessingInstruction (const XMLCh *target, const XMLCh *data) |
void | writeCharacters (const XMLCh *chars, unsigned int length) |
void | writeCDATA (const XMLCh *chars, unsigned int length) |
void | outputNewline () |
| Output a line break.
|
void | writeDefaultEscape (XalanDOMChar ch) |
| Escape and write a character.
|
void | writeDefaultAttributeEscape (XalanDOMChar ch) |
| Escape and write a character in an attribute.
|
bool | writeDefaultEntity (XalanDOMChar ch) |
| Handle one of the default entities, return false if it is not a default entity.
|
bool | writeDefaultAttributeEntity (XalanDOMChar ch) |
| Handle one of the default entities, return false if it is not a default entity.
|
void | writeParentTagEnd () |
| Check to see if a parent's ">" has been written, and, if it has not, write it.
|
XalanDOMString::size_type | writeNormalizedChar (XalanDOMChar ch, const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length) |
| Write a normalized character to the stream.
|
void | writeNumericCharacterReference (unsigned long theNumber) |
XalanDOMString::size_type | writeNormalizedCharBig (const XalanDOMChar chars[], XalanDOMString::size_type start, XalanDOMString::size_type length) |
void | writeCDATAChars (const XalanDOMChar chars[], XalanDOMString::size_type length, bool &outsideCDATA) |
| Write characters for a CDATA section.
|
void | writeAttrString (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength) |
| Write an attribute string.
|
bool | markParentForChildren () |
| Mark the parent element as having a child.
|
bool | getNeedToOutputDoctypeDecl () const |
| Determine if it a DOCTYPE declaration needs to be written.
|
void | openElementForChildren () |
| Open an element for possibile children.
|
bool | outsideDocumentElement () const |
bool | childNodesWereAdded () |
| Determine if an element ever had any children added.
|
void | generateDoctypeDecl (const XalanDOMChar *name) |
void | setXMLVersion (eXMLVersion theVersion) |
| Set the output version during serializing.
|
template<class UnicodeWriter, class ConstantsType, class CharPredicate, class IndentHandler, FormatterListener::eXMLVersion XMLVersion>
class FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >
FormatterToXMLUnicode formats SAX-style events into XML.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::charactersRaw |
( |
const XMLCh *const |
chars, |
|
|
const unsigned int |
length |
|
) |
| |
|
virtual |
Receive notification of character data.
If available, when the disable-output-escaping attribute is used, output raw text without escaping.
- Parameters
-
chars | pointer to characters from the XML document |
length | number of characters to read from the array |
- Exceptions
-
Implements XalanXMLSerializerBase.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
virtual void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::entityReference |
( |
const XMLCh *const |
name | ) |
|
|
virtual |
Receive notification of a entityReference.
- Parameters
-
data | pointer to characters from the XML document |
- Exceptions
-
Implements XalanXMLSerializerBase.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
bool FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeDefaultAttributeEntity |
( |
XalanDOMChar |
ch | ) |
|
|
protected |
Handle one of the default entities, return false if it is not a default entity.
template<class UnicodeWriter , class ConstantsType , class CharPredicate , class IndentHandler , FormatterListener::eXMLVersion XMLVersion>
void FormatterToXMLUnicode< UnicodeWriter, ConstantsType, CharPredicate, IndentHandler, XMLVersion >::writeParentTagEnd |
( |
| ) |
|
|
protected |
Check to see if a parent's ">" has been written, and, if it has not, write it.