and if I completely remove the check then everything works fine.


*/
class DocumentParser : ElementParser
{
    string xmlText;

    /**
        * Constructs a DocumentParser.
        *
        * The input to this function MUST be valid XML.
        * This is enforced by the function's in contract.
        *
        * Params:
        *      xmlText_ = the entire XML document as text
        *
        */
    this(string xmlText_)
    in
    {
        assert(xmlText_.length != 0);
        try
        {
            // Confirm that the input is valid XML
            //check(xmlText_); // COMMENTED OUT!
        }
        catch (CheckException e)
        {
            // And if it's not, tell the user why not
            assert(false, "\n" ~ e.toString());
        }

Reply via email to