Answer the question
In order to leave comments, you need to log in
How to write in c# in xml xmlns?
Here is the code:
XmlWriterSettings xsettings = new XmlWriterSettings();
xsettings.Indent = true;
XmlWriter xmlWriter = XmlWriter.Create("/home/guest/Desktop/users.csproj",xsettings);
xmlWriter.WriteStartDocument();
xmlWriter.WriteStartElement("Project");
xmlWriter.WriteAttributeString("ToolsVersion","4.0");
xmlWriter.WriteAttributeString("DefaultTargets","Build");
xmlWriter.WriteAttributeString("xmlns","http://schemas.microsoft.com/developer/msbuild/2003");
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question