using System;
using System.Linq;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass
{
public static void Main()
{
XmlDocument document = new XmlDocument();
document.Load("domainBooks.xml");
XPathNavigator navigator = document.CreateNavigator();
navigator.MoveToChild("bookstore", "http://www.domain.com/books");
navigator.MoveToChild("book", "http://www.domain.com/books");
navigator.AppendChildElement(navigator.Prefix, "pages", navigator.LookupNamespace(navigator.Prefix), "100");
Console.WriteLine(navigator.OuterXml);
}
}
/*
C#
A
B
8.99
XML
D
E
11.99
*/