Commenting out XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron McNulty

    #1

    Commenting out XML

    Often when testing an app, I want to temporarily comment out sections of the
    App.config file. Is there any way to do this?

    Regards

    Ron


  • Joe Mayo

    #2
    Re: Commenting out XML

    "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
    news:OMcbqyKqDH A.3612@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Often when testing an app, I want to temporarily comment out sections of[/color]
    the[color=blue]
    > App.config file. Is there any way to do this?[/color]


    Hi Ron,

    Use this:

    <!--
    <commented code/>
    -->

    Joe
    --
    Learn C# with step-by-step tutorials and practical examples. Start your first program, explore lists and parsing, and understand how .NET runs your code.



    Comment

    • Ron McNulty

      #3
      Re: Commenting out XML

      Hi Joe

      Thanks for the reply. However, I often have comments inside the section I am
      commenting out, and this fails when it hits the first --> :)

      Regards

      Ron

      "Joe Mayo" <jmayo@ddiieess ppaammeerrssddi iee.com> wrote in message
      news:eA3Hl3KqDH A.1084@tk2msftn gp13.phx.gbl...[color=blue]
      > "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
      > news:OMcbqyKqDH A.3612@TK2MSFTN GP11.phx.gbl...[color=green]
      > > Often when testing an app, I want to temporarily comment out sections of[/color]
      > the[color=green]
      > > App.config file. Is there any way to do this?[/color]
      >
      >
      > Hi Ron,
      >
      > Use this:
      >
      > <!--
      > <commented code/>
      > -->
      >
      > Joe
      > --
      > http://www.csharp-station.com
      >
      >[/color]


      Comment

      • Jon Davis

        #4
        Re: Commenting out XML

        Then replace the -->'s with %-> and then when restoring the commented-out
        block do a find/replace for %-> to -->.

        Be creative.

        Jon


        "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
        news:utRGxMLqDH A.4004@TK2MSFTN GP11.phx.gbl...[color=blue]
        > Hi Joe
        >
        > Thanks for the reply. However, I often have comments inside the section I[/color]
        am[color=blue]
        > commenting out, and this fails when it hits the first --> :)
        >
        > Regards
        >
        > Ron
        >
        > "Joe Mayo" <jmayo@ddiieess ppaammeerrssddi iee.com> wrote in message
        > news:eA3Hl3KqDH A.1084@tk2msftn gp13.phx.gbl...[color=green]
        > > "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
        > > news:OMcbqyKqDH A.3612@TK2MSFTN GP11.phx.gbl...[color=darkred]
        > > > Often when testing an app, I want to temporarily comment out sections[/color][/color][/color]
        of[color=blue][color=green]
        > > the[color=darkred]
        > > > App.config file. Is there any way to do this?[/color]
        > >
        > >
        > > Hi Ron,
        > >
        > > Use this:
        > >
        > > <!--
        > > <commented code/>
        > > -->
        > >
        > > Joe
        > > --
        > > http://www.csharp-station.com
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Ron McNulty

          #5
          Re: Commenting out XML

          Hi Jon

          Sounds like that would work, but it is a tad more messy than hitting a
          toolbar button (e.g. When commenting out C#).

          Regards

          Ron

          "Jon Davis" <jon@REMOVE.ME. PLEASE.jondavis .net> wrote in message
          news:%23Jqhy1Lq DHA.3256@tk2msf tngp13.phx.gbl. ..[color=blue]
          > Then replace the -->'s with %-> and then when restoring the commented-out
          > block do a find/replace for %-> to -->.
          >
          > Be creative.
          >
          > Jon
          >
          >
          > "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
          > news:utRGxMLqDH A.4004@TK2MSFTN GP11.phx.gbl...[color=green]
          > > Hi Joe
          > >
          > > Thanks for the reply. However, I often have comments inside the section[/color][/color]
          I[color=blue]
          > am[color=green]
          > > commenting out, and this fails when it hits the first --> :)
          > >
          > > Regards
          > >
          > > Ron
          > >
          > > "Joe Mayo" <jmayo@ddiieess ppaammeerrssddi iee.com> wrote in message
          > > news:eA3Hl3KqDH A.1084@tk2msftn gp13.phx.gbl...[color=darkred]
          > > > "Ron McNulty" <rmcnulty@xtra. co.nz> wrote in message
          > > > news:OMcbqyKqDH A.3612@TK2MSFTN GP11.phx.gbl...
          > > > > Often when testing an app, I want to temporarily comment out[/color][/color][/color]
          sections[color=blue]
          > of[color=green][color=darkred]
          > > > the
          > > > > App.config file. Is there any way to do this?
          > > >
          > > >
          > > > Hi Ron,
          > > >
          > > > Use this:
          > > >
          > > > <!--
          > > > <commented code/>
          > > > -->
          > > >
          > > > Joe
          > > > --
          > > > http://www.csharp-station.com
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...