• Login
Community
  • Login

Pretty Print (XML only - with line breaks) from DOS command line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 7.0k Views
Loading More Posts
  • 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.
  • N
    Nishant Kansal
    last edited by Feb 5, 2016, 6:30 AM

    I am using wget for windows to download a XML. After downloading, it is coming into a single line when opened in notepad++.

    XMLTools.dll Plugin is working fine in converting it into a well formatted XML, however, it has to be done from Notepad++ UI.

    Is there a way to use it from DOS command prompt? I am using the “Pretty Print (XML only - with line breaks)” feature.

    Could anyone please help me in getting it done?

    Thanks,
    Nishant

    C 1 Reply Last reply Feb 5, 2016, 2:37 PM Reply Quote 0
    • C
      Claudia Frank @Nishant Kansal
      last edited by Feb 5, 2016, 2:37 PM

      Hello @Nishant-Kansal,

      XMLTools can only be used within npp application, not from cmd shell.
      What could be done is (just out of my mind)

      a) starting npp from command line with file being the parameter and then let a recorded macro do its job.
      b) starting npp from command line with file being the parameter and then let nppexec script do the job
      c) starting npp from command line with file being the parameter and then let python(maybe lua as well) script do it
      d) start npp and run wget from within nppexec and afterwards let it manipulate xml
      e) don’t use npp at all and let a scripting language like python do it for you.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • N
        Nishant Kansal
        last edited by Feb 6, 2016, 4:23 PM

        @Claudia-Frank said:

        start npp and run wget from within nppexec and afterwards let it manipulate xml

        Hello Claudia

        Thanks for sharing your thoughts. I liked “start npp and run wget from within nppexec and afterwards let it manipulate xml” and working towards it. I got to know about nppexec plugin. I am able to generate XML through nppexec, however, how to get the XMl formatted is still not happening. Any thoughts on this please?

        Thanks,
        Nishant

        C 1 Reply Last reply Feb 10, 2016, 7:44 PM Reply Quote 0
        • C
          Claudia Frank @Nishant Kansal
          last edited by Feb 10, 2016, 7:44 PM

          @Nishant-Kansal

          I assume, when using nppexec and wget, that retrieved xml document is opened in npp.

          Add the following line to the nppexec call of wget

          npp_menucommand Plugins\XML Tools\Pretty print (XML only - with line breaks)

          this will call the pretty print of xml tools.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          2 out of 4
          • First post
            2/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors