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. XML / XSL
  4. How to add xml-Stylesheet line to xml-file? [modified]

How to add xml-Stylesheet line to xml-file? [modified]

Scheduled Pinned Locked Moved XML / XSL
xmltutorialquestion
9 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, i'd would like to add that line to my xml file using the xmlDocument-Class but i don't know how? Atm i use the following code

    using (XmlWriter writer = XmlWriter.Create(FullFilePath, settings))
    {
    //Add Stylesheet
    writer.WriteRaw(string.Format("", Globals.StylesheetXSL));
    //write root Element
    writer.WriteStartElement("root");
    writer.WriteEndElement();
    writer.Flush();
    writer.Close();
    }

    -- modified at 10:49 Thursday 30th August, 2007

    L 1 Reply Last reply
    0
    • E error1408

      Hi, i'd would like to add that line to my xml file using the xmlDocument-Class but i don't know how? Atm i use the following code

      using (XmlWriter writer = XmlWriter.Create(FullFilePath, settings))
      {
      //Add Stylesheet
      writer.WriteRaw(string.Format("", Globals.StylesheetXSL));
      //write root Element
      writer.WriteStartElement("root");
      writer.WriteEndElement();
      writer.Flush();
      writer.Close();
      }

      -- modified at 10:49 Thursday 30th August, 2007

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      error1408 wrote:

      using the xmlDocument-Class

      error1408 wrote:

      using (XmlWriter writer = XmlWriter.Create(FullFilePath, settings))

      XmlWriter is NOT XmlDocument. I strongly recommend you use the documentation[^] to find information.

      E 1 Reply Last reply
      0
      • L led mike

        error1408 wrote:

        using the xmlDocument-Class

        error1408 wrote:

        using (XmlWriter writer = XmlWriter.Create(FullFilePath, settings))

        XmlWriter is NOT XmlDocument. I strongly recommend you use the documentation[^] to find information.

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

        I KNOW, that is the code I use at the moment... I do not know how to do exactly the same with the xmlDocument-Class. Thats why i'm asking.

        L 1 Reply Last reply
        0
        • E error1408

          I KNOW, that is the code I use at the moment... I do not know how to do exactly the same with the xmlDocument-Class. Thats why i'm asking.

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          error1408 wrote:

          I do not know how to do exactly the same with the xmlDocument-Class.

          I fail to see how that negates my original reply... I strongly recommend you use the documentation to find information.

          E 1 Reply Last reply
          0
          • L led mike

            error1408 wrote:

            I do not know how to do exactly the same with the xmlDocument-Class.

            I fail to see how that negates my original reply... I strongly recommend you use the documentation to find information.

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

            I searched the documentation for my problem. And i found nothing. I checked every method. And because i found nothing, i asked you.

            L 1 Reply Last reply
            0
            • E error1408

              I searched the documentation for my problem. And i found nothing. I checked every method. And because i found nothing, i asked you.

              L Offline
              L Offline
              led mike
              wrote on last edited by
              #6

              error1408 wrote:

              I searched the documentation for my problem. And i found nothing.

              You should probably provide that information in your initial post.

              error1408 wrote:

              I checked every method.

              I guess you missed this one[^]

              E G 2 Replies Last reply
              0
              • L led mike

                error1408 wrote:

                I searched the documentation for my problem. And i found nothing.

                You should probably provide that information in your initial post.

                error1408 wrote:

                I checked every method.

                I guess you missed this one[^]

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

                THANK YOU. You're the man! Why didn't i see it before? At last the ugly code can be banished! Hurray :)

                led mike wrote:

                You should probably provide that information in your initial post.

                Yes perhaps :)

                1 Reply Last reply
                0
                • L led mike

                  error1408 wrote:

                  I searched the documentation for my problem. And i found nothing.

                  You should probably provide that information in your initial post.

                  error1408 wrote:

                  I checked every method.

                  I guess you missed this one[^]

                  G Offline
                  G Offline
                  George L Jackson
                  wrote on last edited by
                  #8

                  I wonder why Microsoft keeps hiding this information in the documentation? :confused:

                  "We make a living by what we get, we make a life by what we give." --Winston Churchill

                  L 1 Reply Last reply
                  0
                  • G George L Jackson

                    I wonder why Microsoft keeps hiding this information in the documentation? :confused:

                    "We make a living by what we get, we make a life by what we give." --Winston Churchill

                    L Offline
                    L Offline
                    led mike
                    wrote on last edited by
                    #9

                    :laugh: Yeah and Google is culpable as well since they provide a perfectly usable Search Engine.

                    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