FIRST EDIT
I'm fetching the Child 1 tag into a DropDownList in a C# form, Plz suggest the best practise code (C#) for deleting the Parent tag & all it's child tags in an XML file.
Example:
<Parents>
<Parent>
<Child 1>Something</Child 1>
<Child 2>Something</Child 2>
<Child 3>Something</Child 3>
<Child 4>Something</Child 4>
</Parent>
<Parent>
<Child 1>Something 1</Child 1>
<Child 2>Something 1</Child 2>
<Child 3>Something 1</Child 3>
<Child 4>Something 1</Child 4>
</Parent>
</Parents>
--- Previous Question ---
How can I insert the following stylesheet tag into my new xml file which is created using C# code????
<?xml-stylesheet type="text/xsl" href="issuez.xsl"?>
C# code to create the xml file:-
new XDocument(
new XElement("issues",
new XElement("issue",
new XElement("cat", comboBox1.Text),
new XElement("desc", richTextBox1.Text),
new XElement("end", dateTimePicker1.Text),
new XElement("att", textBox2.Text)
)
)
).Save(path);