Example #1
0
        public void Append(xTag newTag)
        {
            this.Children.Add(newTag);
            newTag.ParentIndex = this.Children.Count;
            newTag.ParentTag = this;
            if (!string.IsNullOrEmpty(this.xTemplate))
            {
                newTag.MainTag = this;
            }
            else
            {
                newTag.MainTag = this.MainTag;
            }

            if (newTag.Attributes.ContainsKey("name"))
            {
                if (newTag.MainTag.NamedTags.ContainsKey(newTag.Attributes["name"]))
                {
                    newTag.MainTag.NamedTags[newTag.Attributes["name"]] = newTag;
                }
                else
                {
                    newTag.MainTag.NamedTags.Add(newTag.Attributes["name"], newTag);
                    newTag.MainTag.NamedTagsNames.Add(newTag.Attributes["name"]);
                }
            }

            newTag.RootTag = this.RootTag;
        }
Example #2
0
 public void Switch(xTag newTag)
 {
 }