ocean.text.entities.model.MarkupEntityCodec

Template class for xml / html / xhtml / etc (markup language) entity en/decoders, which share basically the same entity encoding scheme, only differing in the exact entities which must be encoded. (The html entities are a superset of the xml entities, for example.)

Members

Classes

MarkupEntityCodec
class MarkupEntityCodec(E : IEntitySet)

Class to en/decode xml / html style entities.

See Also

http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

Example usage:

import ocean.text.entities.HtmlEntityCodec;

scope entity_codec = new HtmlEntityCodec;

char[] test = "hello & world © ß Ȱ'";

if ( entity_codec.containsUnencoded(test) )
{
    char[] encoded;
    entity_codec.encode(test, encoded);
}

Meta

License

Boost Software License Version 1.0. See LICENSE_BOOST.txt for details. Alternatively, this file may be distributed under the terms of the Tango 3-Clause BSD License (see LICENSE_BSD.txt for details).