#include <XMLFormatter.hpp>
Inheritance diagram for xercesc::XMLFormatter:
Public Types | ||||
Public Contants | ||||
enum | EscapeFlags { NoEscapes, StdEscapes, AttrEscapes, CharEscapes, EscapeFlags_Count, DefaultEscape = 999 } | |||
EscapeFlags - Different styles of escape flags to control various formatting. More... | ||||
enum | UnRepFlags { UnRep_Fail, UnRep_CharRef, UnRep_Replace, DefaultUnRep = 999 } | |||
UnRepFlags. More... | ||||
Public Member Functions | ||||
Formatting methods | ||||
void | formatBuf (const XMLCh *const toFormat, const unsigned int count, const EscapeFlags escapeFlags=DefaultEscape, const UnRepFlags unrepFlags=DefaultUnRep) | |||
| ||||
XMLFormatter & | operator<< (const XMLCh *const toFormat) | |||
| ||||
XMLFormatter & | operator<< (const XMLCh toFormat) | |||
void | writeBOM (const XMLByte *const toFormat, const unsigned int count) | |||
Getter methods | ||||
const XMLCh * | getEncodingName () const | |||
| ||||
const XMLTranscoder * | getTranscoder () const | |||
| ||||
Setter methods | ||||
void | setEscapeFlags (const EscapeFlags newFlags) | |||
| ||||
void | setUnRepFlags (const UnRepFlags newFlags) | |||
| ||||
XMLFormatter & | operator<< (const EscapeFlags newFlags) | |||
| ||||
XMLFormatter & | operator<< (const UnRepFlags newFlags) | |||
| ||||
Setter methods | ||||
EscapeFlags | getEscapeFlags () const | |||
| ||||
UnRepFlags | getUnRepFlags () const | |||
|
A number of flags are provided to control whether various optional formatting operations are performed.
EscapeFlags - Different styles of escape flags to control various formatting.
NoEscapes:
No character needs to be escaped. Just write them out as is.
StdEscapes:
The following characters need to be escaped:
character | should be escaped and written as |
& | & |
> | > |
" | " |
< | < |
' | ' |
AttrEscapes:
The following characters need to be escaped:
character | should be escaped and written as |
& | & |
> | > |
" | " |
CharEscapes:
The following characters need to be escaped:
character | should be escaped and written as |
& | & |
> | > |
EscapeFlags_Count:
Special value, do not use directly.
DefaultEscape:
Special value, do not use directly.
UnRepFlags.
The unrepresentable flags that indicate how to react when a character cannot be represented in the target encoding.
UnRep_Fail:
Fail the operation.
UnRep_CharRef:
Display the unrepresented character as reference.
UnRep_Replace:
Replace the unrepresented character with the replacement character.
DefaultUnRep:
Special value, do not use directly.
xercesc::XMLFormatter::XMLFormatter | ( | const XMLCh *const | outEncoding, | |
const XMLCh *const | docVersion, | |||
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
outEncoding | the encoding for the formatted content |
docVersion | ||
target | the formatTarget where the formatted content is written to | |
escapeFlags | the escape style for certain character | |
unrepFlags | the reaction to unrepresentable character | |
manager | Pointer to the memory manager to be used to allocate objects. |
xercesc::XMLFormatter::XMLFormatter | ( | const char *const | outEncoding, | |
const char *const | docVersion, | |||
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::XMLFormatter | ( | const XMLCh *const | outEncoding, | |
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::XMLFormatter | ( | const char *const | outEncoding, | |
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::~XMLFormatter | ( | ) |
xercesc::XMLFormatter::XMLFormatter | ( | const XMLCh *const | outEncoding, | |
const XMLCh *const | docVersion, | |||
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
outEncoding | the encoding for the formatted content |
docVersion | ||
target | the formatTarget where the formatted content is written to | |
escapeFlags | the escape style for certain character | |
unrepFlags | the reaction to unrepresentable character | |
manager | Pointer to the memory manager to be used to allocate objects. |
xercesc::XMLFormatter::XMLFormatter | ( | const char *const | outEncoding, | |
const char *const | docVersion, | |||
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::XMLFormatter | ( | const XMLCh *const | outEncoding, | |
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::XMLFormatter | ( | const char *const | outEncoding, | |
XMLFormatTarget *const | target, | |||
const EscapeFlags | escapeFlags = NoEscapes , |
|||
const UnRepFlags | unrepFlags = UnRep_Fail , |
|||
MemoryManager *const | manager = XMLPlatformUtils::fgMemoryManager | |||
) |
xercesc::XMLFormatter::~XMLFormatter | ( | ) |
void xercesc::XMLFormatter::formatBuf | ( | const XMLCh *const | toFormat, | |
const unsigned int | count, | |||
const EscapeFlags | escapeFlags = DefaultEscape , |
|||
const UnRepFlags | unrepFlags = DefaultUnRep | |||
) |
toFormat | the string to be formatted |
count | length of the string | |
escapeFlags | the escape style for formatting toFormat | |
unrepFlags | the reaction for any unrepresentable character in toFormat |
XMLFormatter& xercesc::XMLFormatter::operator<< | ( | const XMLCh *const | toFormat | ) |
XMLFormatter& xercesc::XMLFormatter::operator<< | ( | const XMLCh | toFormat | ) |
void xercesc::XMLFormatter::writeBOM | ( | const XMLByte *const | toFormat, | |
const unsigned int | count | |||
) |
const XMLCh * xercesc::XMLFormatter::getEncodingName | ( | ) | const [inline] |
const XMLTranscoder * xercesc::XMLFormatter::getTranscoder | ( | ) | const [inline] |
void xercesc::XMLFormatter::setEscapeFlags | ( | const EscapeFlags | newFlags | ) | [inline] |
newFlags | set the escape style for the follow-on formatted content |
void xercesc::XMLFormatter::setUnRepFlags | ( | const UnRepFlags | newFlags | ) | [inline] |
newFlags | set the reaction for unrepresentable character |
XMLFormatter & xercesc::XMLFormatter::operator<< | ( | const EscapeFlags | newFlags | ) | [inline] |
newFlags | set the escape style for the follow-on formatted content |
XMLFormatter & xercesc::XMLFormatter::operator<< | ( | const UnRepFlags | newFlags | ) | [inline] |
XMLFormatter::EscapeFlags xercesc::XMLFormatter::getEscapeFlags | ( | ) | const [inline] |
XMLFormatter::UnRepFlags xercesc::XMLFormatter::getUnRepFlags | ( | ) | const [inline] |