Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 6.9k 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.
    • Nishant KansalN
      Nishant Kansal
      last edited by

      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

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Nishant Kansal
        last edited by

        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
        • Nishant KansalN
          Nishant Kansal
          last edited by

          @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

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Nishant Kansal
            last edited by

            @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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors