Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Is there an xml pretty plugin available?

2006-01-16
2012-11-14
  • I have been searching around for a simple xmltidy/pretty plugin for n++.  Does anyone know of one or if the author of the xml check plugin would be willing to build in pretty/tidy functionality into that plugin?

    Thanks!

     
    • There doesn't seem to be much public interest in maintaining a current compiled libTidy.DLL for Windows so I built a Code::Blocks project so I can build it from the latest sources any time. This means that my libTidy.DLL is as new as anyone cares to make it. The only publically available compiled libTidy.DLL that I can find other than mine is dated 2003 so is a bit old but it does work.

       
    • Yeah, with the help of a HTMLTidy its easy. 
      Under the run menu add a new command like this 

      C:\utils\tidy.exe -m -i -xml -i "$(FULL_CURRENT_PATH)" -o "$(FULL_CURRENT_PATH)"

      Change the path to tidy.exe to wherever its located on your machine.

       
    • I'm adding this to TidyCFG.INI so it appears in the Tidy menu of the TextFX plugin.

      Is there a reason that -i is listed twice?

      This seems to work

      [Tidy: Reindent XML]
      input-xml: yes
      indent:yes

       
      • Eman
        Eman
        2006-03-29

        You probably already figured this out, but I think there was another problem: the -o parameter wasn't needed either. This worked (no config file):

        tidy.exe -m -i -xml "$(FULL_CURRENT_PATH)"

        The -m specifies that the input file is overwritten, so the:
        -o "$(FULL_CURRENT_PATH)"
        was redundant, too.

        Somewhat OT:
        In http://sourceforge.net/forum/message.php?msg_id=3567352 you said that libTidy.DLL is "a few years old", but in the download it is dated "10/27/2005. Does that mean it was relinked recently using old source?

         
    • Hi, XML Check plugin has been updated and features now a "Pretty print" function. Not sure it corresponds exactly to what you expected, but feel free to propose new improvements ;)

      See http://sourceforge.net/forum/forum.php?thread_id=1356958&forum_id=482781 for new release of the plugin