toString method
Returns this nodes plain text value.
If parseCharacterEntities
is true
, the characters found
in characters
will be parsed for and encoded with their
respective character entities.
characters
defaults to less-than (<
), greater-than (>
),
and ampersand (&
), the only 3 characters reserved in XML
PCDATA values.
If characters
is null
every character with a corresponding
HTML 4.01 character code will be encoded.
Implementation
@override
String toString({
bool encodeCharacterEntities = true,
String encodeCharacters = '&<>',
}) {
if (!isMarkup && encodeCharacterEntities) {
return HtmlCharacterEntities.encode(value, characters: encodeCharacters);
}
return value;
}