Error for code:
source/hunt/xml/Element.d(12,13): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(12,23): Error: character 0x200b is not a valid token source/hunt/xml/Element.d(17,15): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(17,26): Error: character 0x200b is not a valid token source/hunt/xml/Element.d(22,13): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(22,29): Error: character 0x200b is not a valid token source/hunt/xml/Element.d(48,13): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(48,21): Error: character 0x200b is not a valid token source/hunt/xml/Element.d(55,13): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(55,23): Error: character 0x200b is not a valid token source/hunt/xml/Element.d(62,13): Error: char 0x200b not allowed in identifier source/hunt/xml/Element.d(62,20): Error: character 0x200b is not a valid token


The Code file Element.d

```D
module hunt.xml.Element;

import hunt.xml.ElementType;

class Element
{
    this(string name)
    {
        this._name = name;
    }

    Element addElement​(string name)
    {
        return new Element(name);
    }

    Element[] getElements​()
    {
        return this._elements;
    }

    Element getParentELement​()
    {
        return this._parentElement;
    }

    Element removeAttribute(string key)
    {
        this._attributes.remove(key);

        return this;
    }

    Element addAttribute(string key, string value)
    {
        this._attributes[key] = value;

        return this;
    }

    Element setAttribute(string key, string value)
    {
        this._attributes[key] = value;

        return this;
    }

    Element addCDATA​(string cdata)
    {
        this._cdata = cdata;

        return this;
    }

    Element addComment​(string comment)
    {
        this._comments ~= comment;

        return this;
    }

    Element addText​(string text)
    {
        this._text = text;

        return this;
    }

    private
    {
        string _name;
        Element[] _elements;
        Element _parentElement;
        string[string] _attributes;
        string[] _comments;
        string _text;
        string _cdata;
    }
}
```

Reply via email to