• Login
Community
  • Login

XML Plugin - Pretty Print

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
5 Posts 3 Posters 27.7k 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.
  • T
    Tiago Jorge
    last edited by Feb 5, 2022, 5:14 PM

    Hi all,

    I am currently having an issue when applying the Pretty Print on a single XML file, it goes through all open tabs (even in other views), applying the XML format to all files (either txt, json, sql…). I can see the tabs being highlighted until the one I have originally performed the formating This is very annoyng and I am currently using other Notepad++ instance (but same version) in other machine to do the formatting. Did some of you have this issue, any input on how to solve it?

    Thanks!

    Notepad++ v8.2.1 (32-bit)
    Build time : Jan 19 2022 - 18:38:49
    Path : C:\Program Files (x86)\Notepad++\notepad++.exe
    Command Line :
    Admin mode : OFF
    Local Conf mode : OFF
    Cloud Config : OFF
    OS Name : Windows 10 Home N (64-bit)
    OS Version : 2009
    OS Build : 19044.1466
    Current ANSI codepage : 1252
    Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppXmlTreeviewPlugin.dll XMLTools.dll

    P D 2 Replies Last reply Feb 5, 2022, 7:00 PM Reply Quote 0
    • P
      PeterJones @Tiago Jorge
      last edited by Feb 5, 2022, 7:00 PM

      @tiago-jorge ,

      I cannot replicate.

      I unzipped a fresh v8.2.1 portable, installed XML Tools, and created an XML file and a JSON file:

      <?xml version='1.0' encoding='UTF-8' standalone='yes'?><html><head></head><body><p>here</p><div class="xyz"><p>contents</p></div></body></html>
      
      { "glossary": { "title": "example glossary", "GlossDiv": { "title": "S", "GlossList": { "GlossEntry": { "ID": "SGML", "SortAs": "SGML", "GlossTerm": "Standard Generalized Markup Language", "Acronym": "SGML", "Abbrev": "ISO 8879:1986", "GlossDef": { "para": "A meta-markup language, used to create markup languages such as DocBook.", "GlossSeeAlso": ["GML", "XML"] }, "GlossSee": "markup" } } } }, "example": "hello" }
      

      and have them both open in Notepad++.

      I then activate the ex.xml and run Plugins > XML Tools > Pretty Print. The XML is made pretty; the JSON stays exactly the same.

      I then added JSON Viewer and XML Treeview Plugins as well, and tried again. Still only affected the XML file, not the other.

      Then i saw I was in 64bit, so I unzipped a 32-bit to match yours, and installed those three plugins. Plugins > XML Tools > Pretty Print still only affects the active XML I even opened a second XML file, and ran the Pretty Print in the first: it still only affects the active XML, and not the second XML or the JSON.

      So I don’t know why you’ve had problems, but I cannot replicate.

      Notepad++ v8.2.1   (32-bit)
      Build time : Jan 19 2022 - 18:38:49
      Path : C:\usr\local\apps\npp\npp.8.2.1.portable\notepad++.exe
      Command Line : 
      Admin mode : OFF
      Local Conf mode : ON
      Cloud Config : OFF
      OS Name : Windows 10 Home (64-bit) 
      OS Version : 2009
      OS Build : 19043.1466
      Current ANSI codepage : 1252
      Plugins : mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppXmlTreeviewPlugin.dll XMLTools.dll 
      
      T 2 Replies Last reply Feb 6, 2022, 4:46 PM Reply Quote 3
      • T
        Tiago Jorge @PeterJones
        last edited by Feb 6, 2022, 4:46 PM

        @peterjones Thanks for your input.

        I recall, that in the installation where I am having the issue, I work sometimes with XML files of around 2000 lines. And I have reached the Tab number 100 (althoug I am not currently having that amount of tabs opened) : )

        I will try also to replicate this scenario in the installation where I am not facing the issue.

        Re-install will also be an option if no further update arise. Because this plugin is very usefull to me.

        Thank you.

        1 Reply Last reply Reply Quote 0
        • T
          Tiago Jorge @PeterJones
          last edited by Feb 7, 2022, 12:09 PM

          Hi all, I’ve installed the new 8.3 64bits and applied the plugins and everything is working smooth now.

          Thank you all and @PeterJones in particular.

          1 Reply Last reply Reply Quote 0
          • D
            dinkumoil @Tiago Jorge
            last edited by Feb 7, 2022, 12:45 PM

            @tiago-jorge

            … and for the records: I guess XML Tools plugin’s option Apply to all open files (available via the plugin’s menu entry) has caused this issue.

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