Add CSS to XML with XMLWriter
-
Hi, how do i programmatically add a link to a css file e.g. to a xml file? Thats my code so far:
XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = (" "); using (XmlWriter writer = XmlWriter.Create(logFileXml, settings)) { // Write XML data. writer.WriteStartElement("log"); writer.WriteEndElement(); writer.Flush();
-
Hi, how do i programmatically add a link to a css file e.g. to a xml file? Thats my code so far:
XmlWriterSettings settings = new XmlWriterSettings(); settings.Indent = true; settings.IndentChars = (" "); using (XmlWriter writer = XmlWriter.Create(logFileXml, settings)) { // Write XML data. writer.WriteStartElement("log"); writer.WriteEndElement(); writer.Flush();
Errm - you don't link CSS to XML. You link CSS to your generated (X)HTML.
Deja View - the feeling that you've seen this post before.
-
Errm - you don't link CSS to XML. You link CSS to your generated (X)HTML.
Deja View - the feeling that you've seen this post before.
-
Ok now i'm confused. I just want to style my xml-files so i can view it like a nice html table :D
For that, you're talking about XSLT (XML style sheets), which is a whole other animal. Google XSLT and you should find several good guides. But be fore-warned, XSLT is not complicated but it's fugly.
Try code model generation tools at BoneSoft.com.
-
For that, you're talking about XSLT (XML style sheets), which is a whole other animal. Google XSLT and you should find several good guides. But be fore-warned, XSLT is not complicated but it's fugly.
Try code model generation tools at BoneSoft.com.