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. xml comment tags

xml comment tags

Scheduled Pinned Locked Moved C#
csharpc++visual-studioxml
3 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.
  • S Offline
    S Offline
    stonee74
    wrote on last edited by
    #1

    Hi there, I am havin an enormous amount of c++ comments /** blabla **/ to be translated into xml tags /// /// blabla /// is there a way to automate this in vs .net 2003 thaks, stonee

    D E 2 Replies Last reply
    0
    • S stonee74

      Hi there, I am havin an enormous amount of c++ comments /** blabla **/ to be translated into xml tags /// /// blabla /// is there a way to automate this in vs .net 2003 thaks, stonee

      D Offline
      D Offline
      Daniel Turini
      wrote on last edited by
      #2

      stonee74 wrote: is there a way to automate this in vs .net 2003 Macros. ORACLE One Real A$#h%le Called Lary Ellison

      1 Reply Last reply
      0
      • S stonee74

        Hi there, I am havin an enormous amount of c++ comments /** blabla **/ to be translated into xml tags /// /// blabla /// is there a way to automate this in vs .net 2003 thaks, stonee

        E Offline
        E Offline
        Eric Gunnerson msft
        wrote on last edited by
        #3

        You could do it with macros, but I don't think I would. I'd be more likely to write a C# program that opened the file and used regex to do the replacements. I'd use a regex something like: Regex regex = new Regex(@" /\*\* # start of comment \s+ (? # capture to named Comment .+?\s+ # comment text ) # end of capture \s+ \*\*/ # end of comment.", RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace); and then use a MatchEvaluator function like: static public string Evaluator(Match match) { string[] lines = match.Groups["Comment"].Value.Split('\n'); for (int i = 0; i < lines.Count; i++) lines[i] = "///" + lines[i]; return String.Join("\n", lines); }

        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