Cannot view XML input using XSL style sheet.
Please correct the error and then click the Refresh button, or try
again later.
A name contained an invalid character.
Error processing resource
'file:///D:/Training/XMLrelated/XMLrelated/bin/Debug/Issue...
i am getting the above error while trying to create xml file using xmlwriter can anyone plz help out regarding the issue..
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace XMLrelated
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnSubmit_Click(object sender, EventArgs e)
{
XmlTextWriter writer = new XmlTextWriter("Issues.xml",Encoding.UTF8);
writer.WriteStartDocument();
writer.WriteStartElement("Root");
writer.WriteStartElement("IssueList");
writer.WriteStartElement("Issue");
writer.WriteStartElement("Subject");
writer.WriteString(txtSubject.Text);
writer.WriteEndElement(); //Subject
writer.WriteStartElement("Description");
writer.WriteString(txtDescription.Text);
writer.WriteEndElement(); // Description
writer.WriteStartElement("Source");
writer.WriteString(txtSource.Text);
writer.WriteEndElement(); //Source
foreach (string attachment in txtAttachments.Text.Split(','))
{
writer.WriteStartElement("Attachments");
writer.WriteString(attachment);
writer.WriteEndElement(); //Attachments
}
writer.WriteStartElement("Date Received");
writer.WriteString(txtDateReceived.Text);
writer.WriteEndElement(); //Date Received
foreach (string comments in txtComments.Text.Split(','))
{
writer.WriteStartElement("Comments");
writer.WriteString(comments);
writer.WriteEndElement(); //Comments
}
writer.WriteStartElement("Solution");
writer.WriteString(txtSolution.Text);
writer.WriteEndElement(); //Solution
writer.WriteStartElement("Status");
writer.WriteString(txtStatus.Text);
writer.WriteEndElement(); //Status
writer.WriteStartElement("Date Closed");
writer.WriteString(txtDateClosed.Text);
writer.WriteEndElement(); //Date closed
writer.WriteEndElement(); //Issue
writer.WriteEndElement(); //IssueList
writer.WriteEndElement(); //Root
writer.WriteEndDocument(); //Main document close
writer.Close();
}
}
}
....
....
...
plz help me out....
Thanks in advance....