In my windows Form application I have one text box in which i need to enter proper HTML tag and now I need to load data in text box into a XML reader then I need to process each element recursively.After this I have to generate a PDF file which contains for example like if i entered
, tags the PDF should contain a table format and an image.I am very new to programming can any help me to do this application
What I have tried:
Created A class
namespace PDFfile
{
public class Information
{
private string data1;
public string textBox1
{
get { return data1; }
set{data1=value;}
}
}
}
created another class like below
public class SaveXml
{
public static void SaveData(object obj, string filename)
{
XmlSerializer sr =new XmlSerializer(obj.GetType());
TextWriter write = new StreamWriter(filename);
sr.Serialize(write, obj);
write.Close();
}
}
code in form1.cs
private void textBox1_TextChanged(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
textBox1.SelectAll();
var a = textBox1.Focus();
Information info = new Information();
info.textBox1 = textBox1.Text;
SaveXml.SaveData(info, "data.xml");
}