예제 #1
0
        public void Insert(Token.Character characterToken)
        {
            Node node;

            // characters in script and style go in as datanodes, not text nodes
            if (StringUtil.In(CurrentElement.TagName(), "script", "style"))
            {
                node = new DataNode(characterToken.Data.ToString(), _baseUri);
            }
            else
            {
                node = new TextNode(characterToken.Data.ToString(), _baseUri);
            }
            CurrentElement.AppendChild(node); // doesn't use insertNode, because we don't foster these; and will always have a stack.
        }
예제 #2
0
        public void Insert(Token.Character characterToken)
        {
            Node node = new TextNode(characterToken.Data.ToString(), _baseUri);

            InsertNode(node);
        }