예제 #1
0
 public void insertChild(Node child, int position)
 {
     if (position == 0)
     {
         this.m_XContainer.AddFirst(child.XNode);
     }
     else {
         var elementAtPosition = this.m_XContainer.Nodes().ElementAt(position - 1);
         elementAtPosition.AddAfterSelf(child.XNode);
     }
 }
예제 #2
0
 public void appendChild(Node child)
 {
     var childAsParentNode = child as ParentNode;
     if (childAsParentNode != null)
     {
         this.m_XContainer.Add(childAsParentNode.m_XContainer);
     }
     var childAsText = child as Text;
     if (childAsText != null)
     {
         this.m_XContainer.Add(childAsText.XText);
     }
 }
예제 #3
0
 public void removeChild(Node child)
 {
     child.detach();
 }
예제 #4
0
 public int indexOf(Node node)
 {
     return this.m_XContainer.Nodes().ToList().IndexOf(node.XNode);
 }