As the headline states, when i try to use doc.Save("data.xml"); it gives me the error "Argument 1: cannot convert from 'string' to 'System.IO.Stream'
I've tried both of these:
public void holder()
{
string location = "Employees.xml";
XDocument doc = XDocument.Load(location);
XElement person = doc.Element("Person");
person.Add(new XElement("Employee",
new XElement("Name", "David"),
new XElement("Dept", "Chef")));
doc.Save(location);
}
public void holder()
{
XDocument doc = XDocument.Load("Employees.xml");
XElement person = doc.Element("Person");
person.Add(new XElement("Employee",
new XElement("Name", "David"),
new XElement("Dept", "Chef")));
doc.Save("Employees.xml");
}
The loading part gives me no problems, its the saving..