Apache Log4cxx  Version 1.7.0
Loading...
Searching...
No Matches
log4cxx::helpers::Transform Class Reference

Utility class for transforming strings. More...

#include <transform.h>

Static Public Member Functions

static void appendEscapingTags (LogString &buf, const LogString &input)
 Add input, which may contain HTML tags (ie, <b>, <table>, etc) to buf while replacing any '<' and '>' characters with respective predefined entity references.
static void appendEscapingCDATA (LogString &buf, const LogString &input)
 Add input to buf while ensuring embedded CDEnd strings (]]>) are handled properly within the message.
static void appendCharacterReference (LogString &buf, unsigned int ch)
 Add ch to buf as an XML character reference.
static void appendLegalCharacters (LogString &buf, const LogString &input)
 Append a transformation of input onto buf.

Detailed Description

Utility class for transforming strings.

Member Function Documentation

◆ appendCharacterReference()

void log4cxx::helpers::Transform::appendCharacterReference ( LogString & buf,
unsigned int ch )
static

Add ch to buf as an XML character reference.

Parameters
bufoutput stream holding the XML data to this point.
chthe value to encode as a XML character reference

◆ appendEscapingCDATA()

void log4cxx::helpers::Transform::appendEscapingCDATA ( LogString & buf,
const LogString & input )
static

Add input to buf while ensuring embedded CDEnd strings (]]>) are handled properly within the message.

The initial CDStart (<![CDATA[) and terminating CDEnd (]]>) of the CDATA section must be added by the calling method. Any NUL character in input is not copied to buf. A character reference is used in place of a character whose value is not permitted by the XML 1.0 specification.

Parameters
bufTransformed input text is added to this.
inputThe text to be appended to buf

◆ appendEscapingTags()

void log4cxx::helpers::Transform::appendEscapingTags ( LogString & buf,
const LogString & input )
static

Add input, which may contain HTML tags (ie, <b>, <table>, etc) to buf while replacing any '<' and '>' characters with respective predefined entity references.

Any NUL character in input is not copied to buf. A character reference is used in place of a character whose value is not permitted by the XML 1.0 specification.

Parameters
bufoutput stream where to write the modified string.
inputThe text to be converted.

◆ appendLegalCharacters()

void log4cxx::helpers::Transform::appendLegalCharacters ( LogString & buf,
const LogString & input )
static

Append a transformation of input onto buf.

Only the valid XML 1.0 specification characters (#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]) are copied to buf. Any special character (<, >, & and ") is replaced with an entity reference.

Parameters
bufTransformed input text is added to this.
inputThe text to be transformed.

The documentation for this class was generated from the following file: