Example #1
0
        internal void Insert(Token.Character characterToken)
        {
            Node node;
            // characters in script and style go in as datanodes, not text nodes
            string tagName = CurrentElement().TagName;

            if (tagName.Equals("script") || tagName.Equals("style"))
            {
                node = new DataNode(characterToken.GetData(), baseUri);
            }
            else
            {
                node = new TextNode(characterToken.GetData(), baseUri);
            }
            CurrentElement().AppendChild(node);
        }
Example #2
0
        internal void Insert(Token.Character characterToken)
        {
            Node node = new TextNode(characterToken.GetData(), baseUri);

            InsertNode(node);
        }