This class provides the basic formatting capabilities that are required to turn the Unicode based XML data from the parsers into a form that can be used on non-Unicode based systems, that is, into local or generic text encodings.
More...
|
|
| 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) |
|
| 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) |
|
| XMLFormatter (const XMLCh *const outEncoding, XMLFormatTarget *const target, const EscapeFlags escapeFlags=NoEscapes, const UnRepFlags unrepFlags=UnRep_Fail, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) |
|
| XMLFormatter (const char *const outEncoding, XMLFormatTarget *const target, const EscapeFlags escapeFlags=NoEscapes, const UnRepFlags unrepFlags=UnRep_Fail, MemoryManager *const manager=XMLPlatformUtils::fgMemoryManager) |
|
| ~XMLFormatter () |
|
|
void | formatBuf (const XMLCh *const toFormat, const XMLSize_t 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 XMLSize_t count) |
|
|
const XMLCh * | getEncodingName () const |
|
const XMLTranscoder * | getTranscoder () const |
|
XMLTranscoder * | getTranscoder () |
|
|
void | setEscapeFlags (const EscapeFlags newFlags) |
|
void | setUnRepFlags (const UnRepFlags newFlags) |
|
XMLFormatter & | operator<< (const EscapeFlags newFlags) |
|
XMLFormatter & | operator<< (const UnRepFlags newFlags) |
|
EscapeFlags | getEscapeFlags () const |
|
UnRepFlags | getUnRepFlags () const |
|
void * | operator new (size_t size) |
| This method overrides operator new. More...
|
|
void * | operator new (size_t size, MemoryManager *memMgr) |
| This method defines a custom operator new, that will use the provided memory manager to perform the allocation. More...
|
|
void * | operator new (size_t size, void *ptr) |
| This method overrides placement operator new. More...
|
|
void | operator delete (void *p) |
| This method overrides operator delete. More...
|
|
void | operator delete (void *p, MemoryManager *memMgr) |
| This method provides a matching delete for the custom operator new. More...
|
|
void | operator delete (void *p, void *ptr) |
| This method provides a matching delete for the placement new. More...
|
|
This class provides the basic formatting capabilities that are required to turn the Unicode based XML data from the parsers into a form that can be used on non-Unicode based systems, that is, into local or generic text encodings.
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.
Enumerator |
---|
NoEscapes |
|
StdEscapes |
|
AttrEscapes |
|
CharEscapes |
|
EscapeFlags_Count |
|
DefaultEscape |
|
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.
Enumerator |
---|
UnRep_Fail |
|
UnRep_CharRef |
|
UnRep_Replace |
|
DefaultUnRep |
|