I am new to .xml files in general and I am currently working on project where I take simple .txt file with values inside of it and generating a .xml file out of it.
I am trying to replicate this in the xml file:
Only value2 gets changed based on the .txt file.
I am getting working files but the resulting .xml file looks different from what I want.
<value1 name="value2"> </value1>
xmlWriter.writeStartElement("value1"); xmlWriter.writeAttributeString("name", "value2"); xmlWriter.writeEndElement();
XmlWriterSettings wSettings = new XmlWriterSettings(); wSettings.Indent = true; wSettings.ConformanceLevel = ConformanceLevel.Fragment; wSettings.OmitXmlDeclaration = true;