ocean.text.entities.XmlEntityCodec

Xml entity en/decoder.

Example usage:

import ocean.text.entities.XmlEntityCodec;

scope entity_codec = new XmlEntityCodec;

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

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

Members

Aliases

XmlEntityCodec
alias XmlEntityCodec = MarkupEntityCodec!(XmlEntitySet)

Class to en/decode xml entities.

Functions

decodeTest
void decodeTest(XmlEntityCodec codec, const(Char)[] str, const(Char)[] expected_result)

Unit test

encodeTest
void encodeTest(XmlEntityCodec codec, const(Char)[] str, const(Char)[] expected_result)

Unit test

test
void test()

Unit test

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).