You want to use appendChild for creating new child in the current file.
I don't see Modules think it is a list or something.
private void LoadXmlData()
{
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(Server.MapPath("~/App_Data/UserRights.xml"));
var userList = new list(of string, string)
var nodes = (xmlDoc.GetElementsByTagName("Rights")[0]).GetElementsByTagName("Right");
foreach (node in nodes)
{
var login = node.GetElementsByTagName("UserName")[0];
var module = node.GetElementsByTagName("Modules")[0];
newNode = xmlDoc.createElement("UserVame");
node.GetElementsByTagName("Modules")[0].appendChild(newNode)
userList.add(login, module)
}
}