示例#1
0
        // localName is null

        /// <summary>Splits the text into two nodes at the given offset.</summary>
        public void splitText(int offset)
        {
            string text = characterData_;

            data = text.Substring(0, offset);

            // Get the rest:
            text = text.Substring(offset);

            // Create a new text node:
            TextNode ele = Namespace.CreateTextNode(document);

            // Write text to it:
            ele.textContent = text;

            // Insert immediately after "me":
            parentNode.insertBefore(ele, nextSibling);
        }
示例#2
0
 /// <summary>Creates a text node.</summary>
 public TextNode createTextNode()
 {
     return(Namespace.CreateTextNode(this));
 }