I thought I might use the XML functions in C# to help me do some
repetitive typing in an XHTML file, but I'm stuck. Here's what I have
before I just stopped:
void WriteXMLFile()
{
string path = @"C:\elements.xml";
XmlTextWriter xml = new XmlTextWriter(path,
System.Text.Encoding.UTF8);
xml.Formatting = Formatting.Indented;
xml.WriteStartElement("div");
xml.WriteAttributeString("id", "parameters");
xml.WriteElementString
xml.WriteStartElement("p");
xml.WriteAttributeString("class", "i1");
}
The reason I stopped is because I somehow need to be able to create an
element that has both attributes and content, but none of the functions
I've read about so far (in C#) can do this. Am I missing them, or is it
just that XML documents don't have elements that have attributes and
content? Is it just one or the other? If so, is there some other way I
can write a simple program to automate some of my HTML?
Thanks.