Error: char 0x200b not allowed in identifier
    zoujiaqing 
    zoujiaqing at gmail.com
       
    Mon Jun  3 13:37:22 UTC 2019
    
    
  
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;
     }
}
```
    
    
More information about the Digitalmars-d-learn
mailing list