Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Add CSS to XML with XMLWriter

Add CSS to XML with XMLWriter

Scheduled Pinned Locked Moved C#
questioncssxml
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    error1408
    wrote on last edited by
    #1

    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();

    P 1 Reply Last reply
    0
    • E error1408

      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();

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      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.

      E 1 Reply Last reply
      0
      • P Pete OHanlon

        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.

        E Offline
        E Offline
        error1408
        wrote on last edited by
        #3

        Ok now i'm confused. I just want to style my xml-files so i can view it like a nice html table :D

        B 1 Reply Last reply
        0
        • E error1408

          Ok now i'm confused. I just want to style my xml-files so i can view it like a nice html table :D

          B Offline
          B Offline
          BoneSoft
          wrote on last edited by
          #4

          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.

          E 1 Reply Last reply
          0
          • B BoneSoft

            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.

            E Offline
            E Offline
            error1408
            wrote on last edited by
            #5

            OK thank you. I have to do it for work :D

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups