Community
    • Login

    [New Plugin] XML Tree – FOXE-style XML tree panel

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    4 Posts 4 Posters 162 Views 2 Watching
    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.
    • F Offline
      FalcoNefasto
      last edited by

      Hi everyone,

      I’d like to share a 64-bit plugin I built: XML Tree (NppXmlTree).
      alt text
      If you’ve ever used FOXE (First Object XML Editor), you probably know how convenient its tree view and quick structural tools are—especially on massive XML files. I got tired of switching out of Notepad++ every time I needed that workflow, so I wrote a native Win32/C++ plugin to bring it directly into N++.

      What it does

      • Handles large files smoothly: No heavy DOM—it scans into a flat 16-byte-per-node index and populates tree branches lazily on expand (~230 ms on a 100 MB XML).
      • Navigation & live filter: Click a node/attribute to select it, double-click or press Enter to jump and center it in the editor, optionally follow the caret, or filter nodes from the search bar.
      • Edit straight from the tree: Rename, delete, cut, copy, paste, duplicate, or add child elements and attributes—each edit is wrapped as a single Ctrl+Z undo step.
      • Built-in helpers: Well-formedness checker (lists unclosed/mismatched tags with clickable line jumps), node path & data copy, sum/unique values under a node, and entity encode/decode.
      • Stays out of your way: Auto-shows on XML files and hides on other tabs, matches Notepad++ light/dark themes, and compiles down to a single dependency-free DLL.

      Download & Setup

      1. Grab NppXmlTree.dll from GitHub Releases (source and full documentation are in the GitHub repo).
      2. Put it in Notepad++\plugins\NppXmlTree\NppXmlTree.dll (64-bit Notepad++ 8.x on Windows x64).
      3. Open any XML file or toggle it via Plugins > XML Tree.

      If anyone gives it a spin and spots any bugs, theme quirks, or edge cases—especially before I look into submitting it to Plugins Admin—I’d love to hear your thoughts!

      Snabel42S 1 Reply Last reply Reply Quote 2
      • Snabel42S Online
        Snabel42 @FalcoNefasto
        last edited by

        @FalcoNefasto this seems very interesting. I’ll try to use it for a while give feedback as I’m able.

        I’m a relatively light user these days, but out of curiosity, did you ever see or try this: https://github.com/joaoasrosa/nppxmltreeview/

        I’ve always kept it installed, and it still works although it hasn’t had an update in 8 years.

        1 Reply Last reply Reply Quote 0
        • D Offline
          DanielCollins
          last edited by

          Thanks for sharing this, FalcoNefasto. The lazy loading approach sounds like the right call for large XML files — a full tree built up front is usually what makes these tools slow. The well-formedness checker with clickable line jumps also looks genuinely useful; that is the part I would use most when editing config files by hand. One question: how does it handle files with namespaces or very deeply nested elements? I will give it a try on a few of my larger files and report back if I spot anything.

          1 Reply Last reply Reply Quote 0
          • Mark OlsonM Online
            Mark Olson
            last edited by

            @falconefasto

            Haven’t had a chance to play around with it yet, but I’m the maintainer for JsonTools so I’ve spent a lot of time thinking about and dealing with the various pitfalls that can occur with a tree view of the sort you’re describing.

            Some thoughts:

            1. Does the treenode position work properly when the document contains multi-byte characters? JsonTools parses the document as a UTF-16 string but Notepad++ buffer positions generally assume the document is UTF-8 encoded, so the parser has to take this into account when assigning positions to JSON nodes.
            2. Lazy loading is a great idea, but how do you handle a treenode with a lot of direct children? In JsonTools I have a configurable setting for how many direct children a tree node can have, which I arbitrarily defaulted to 10,000. Otherwise the tree can cause NPP to hang even with lazy loading.
            3. A context menu that appears when you right-click a tree node seems like a good idea. Off the top of my head, maybe have the options be:
              • select the start tag
              • snap to end tag
              • select the inner XML
              • copy attributes to clipboard
              • recursively expand/collapse all subtrees

            I can’t give any advice on implementation, since I’ve written all my plugins in C#.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors