XML Editor recommendations?
Moderator: Moderators for English X Forum
-
- Posts: 1088
- Joined: Fri, 20. Jul 18, 23:20
XML Editor recommendations?
Does anyone have a recommendation for an XML editor that allows formatting the saves so nodes can be collapsed? I have tried Notepad++ with the XML plugin but because of the large size of X4 saves, you have to turn off the XML formatting which basically turns it into a flat text editor.
What I'm looking to do is remove a station from a sector. I started a new game with my PHQ located in Nopileo's Fortune II but for some reason, SCA decided to build a station right next to my plot which ruins future expansion plans. Since the game is literally 30 minutes old, I don't see the harm in simply deleting this SCA station from the save file. In Notepad++ I can find the station I want to remove, but that's when it gets difficult. Without formatting, I can't collapse the station's XML node to use the "mark selection start/end" function that Notepad++ offers, and have to manually scroll down to find the end of the station node. This can take a seriously long time depending on how big the station is because it could have hundreds of nodes, and is prone to error because it's possible with all the "connection" nodes that I might select part of another station by accident, breaking the entire XML file.
Thanks.
What I'm looking to do is remove a station from a sector. I started a new game with my PHQ located in Nopileo's Fortune II but for some reason, SCA decided to build a station right next to my plot which ruins future expansion plans. Since the game is literally 30 minutes old, I don't see the harm in simply deleting this SCA station from the save file. In Notepad++ I can find the station I want to remove, but that's when it gets difficult. Without formatting, I can't collapse the station's XML node to use the "mark selection start/end" function that Notepad++ offers, and have to manually scroll down to find the end of the station node. This can take a seriously long time depending on how big the station is because it could have hundreds of nodes, and is prone to error because it's possible with all the "connection" nodes that I might select part of another station by accident, breaking the entire XML file.
Thanks.
-
- Posts: 882
- Joined: Sat, 10. Dec 11, 03:10
Re: XML Editor recommendations?
I use VS Code. Just had a quick look, collapsing and selecting an XML node seemed easy enough.
-
- Posts: 3548
- Joined: Sat, 12. Jun 10, 04:43
Re: XML Editor recommendations?
How smoothly does it go? Because notepad++ takes forever to open the save and then load it so I can edit stuff I want to.TheDeliveryMan wrote: ↑Tue, 18. Feb 25, 23:27 I use VS Code. Just had a quick look, collapsing and selecting an XML node seemed easy enough.
I could wait for an hour iirc. And even then it might not have actually loaded everything.
-
- Posts: 1347
- Joined: Tue, 28. Nov 23, 15:38
Re: XML Editor recommendations?
X4 save files are often over a gigabyte of XML uncompressed. Many editors will struggle with this volume. VSCode will load such file, though by default it will disable syntax highlighting, and code folding will be unavailable. Beyond that it is usable. Another possibility is Far Manager, though this is an acquired taste I guess. Also, if a text editor takes too long to load, there's often no need to wait. Programming tools usually megabytes of text at most.
-
- Posts: 351
- Joined: Wed, 6. Nov 02, 20:31
Re: XML Editor recommendations?
Notepad ++ is very slow when it comes to large files. On of the best editors I had, at least in the past, was ultraedit. However its not free. But they offer a 30 day trial.
-
- Posts: 22559
- Joined: Sat, 23. Apr 05, 21:42
Re: XML Editor recommendations?
I don't edit XML. At most I've looked at saves. With Python, which has something like "SAX" and "DOM" parsers. Whether they could select and drop specific nodes and keep the rest "consistent" ... no idea.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 3520
- Joined: Thu, 26. Jan 06, 19:45
Re: XML Editor recommendations?
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb, OLED WQXGA 2560x1600.
Seeker of Sohnen. Long live Queen Polypheides. 
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb, OLED WQXGA 2560x1600.


-
- Posts: 6701
- Joined: Mon, 5. May 08, 00:05
Re: XML Editor recommendations?
When everything else fails - GNU Emacs to the rescue. 


Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!
Tammancktall: Es ist eine Ehre für sie mich kennenzulernen...
CBJ: Thanks for the savegame. We will add it to our "crazy saves" collection [..]
Feature request: paint jobs on custom starts
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!
Tammancktall: Es ist eine Ehre für sie mich kennenzulernen...
CBJ: Thanks for the savegame. We will add it to our "crazy saves" collection [..]

-
- Posts: 1347
- Joined: Tue, 28. Nov 23, 15:38
-
- Posts: 1088
- Joined: Fri, 20. Jul 18, 23:20
Re: XML Editor recommendations?
Thanks everyone for the suggestions. I probably should have mentioned I'm using Windows.
<connection connection="stations">
<component class="station" macro="station_pla_headquarters_base_01_macro"
When I collapse the "component" node, I expected another <component class="station" node to be visible below the collapsed block for the next station in the sector. Instead, I only had the closing connection node. But at least the search feature works so I can search by station ID.
I think I might have a workaround for the problem of NPC stations building... create a new game (custom, to move the PHQ) and save it immediately. Edit the save to give some extra $, then reload it and buy a bunch of plots near the PHQ but just leave them empty. That way the NPCs can't buld too close.
This looks like it might work, it loaded the file as flat text so I had to switch it to XML on the 'syntax' menu. It did take a while to parse the XML but at least I could collapse nodes and the "find" option didn't take hours like Notepad++ did. It appears that the stations aren't saved linearly in the save file based on the sector, this is what I had:alt3rn1ty wrote: ↑Wed, 19. Feb 25, 17:25 Sublime text is supposed to be good, handles big files nicely.
https://www.sublimetext.com/
<connection connection="stations">
<component class="station" macro="station_pla_headquarters_base_01_macro"
When I collapse the "component" node, I expected another <component class="station" node to be visible below the collapsed block for the next station in the sector. Instead, I only had the closing connection node. But at least the search feature works so I can search by station ID.
I think I might have a workaround for the problem of NPC stations building... create a new game (custom, to move the PHQ) and save it immediately. Edit the save to give some extra $, then reload it and buy a bunch of plots near the PHQ but just leave them empty. That way the NPCs can't buld too close.
-
- Posts: 3643
- Joined: Tue, 22. Oct 13, 15:26
Re: XML Editor recommendations?
Out of curiosity are you averse to just killing the stations? Because removing SCA with violence is actually super easy. Laying some friend/foe mines on its defensive modules and marking it hostile will completely neuter it, so if you have taken even one SCA destroyer at some point—itself very easy to do—you can just leave it to clean up the rest.
***modified***
-
- Posts: 3520
- Joined: Thu, 26. Jan 06, 19:45
Re: XML Editor recommendations?
I found Sublime text does the keep open the last tabs thing like Windows new notepad does, which irked me a bit but got used to it.user1679 wrote: ↑Thu, 20. Feb 25, 06:07 Thanks everyone for the suggestions. I probably should have mentioned I'm using Windows.
This looks like it might work, it loaded the file as flat text so I had to switch it to XML on the 'syntax' menu. It did take a while to parse the XML but at least I could collapse nodes and the "find" option didn't take hours like Notepad++ did. ~alt3rn1ty wrote: ↑Wed, 19. Feb 25, 17:25 Sublime text is supposed to be good, handles big files nicely.
https://www.sublimetext.com/
Also worth a mention if you want to Diff two files side by side, Sublime text has a bit of a different way of doing things ..
You dont need any Compare extension like Notepad++ used to:
Navigate to the folder containing both files through Open Folder... or in a project
Select the two files (ie, by holding Ctrl on Windows or ⌘ on macOS) you want to compare in the sidebar
Right click and select the Diff files... option.
Someone did a screen animation showing the Diff option being used from the Sidebar ..
https://forum.sublimetext.com/t/sublime ... iles/68872
I didn't mention too much about it initially (you can lead a horse to water etcetera), but I think Sublime text is the best text editor I have ever used.
Last edited by alt3rn1ty on Thu, 20. Feb 25, 22:38, edited 1 time in total.
Spec's@2025-05-17 - Laptop - Acer Predator Helios Neo 16 AI - Win 11 x64
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb, OLED WQXGA 2560x1600.
Seeker of Sohnen. Long live Queen Polypheides. 
CPU - Intel Core Ultra 9 275HX 2.7-5.4ghz, RAM - 32gb DDR5 6400(OC),
Discrete GPU - NVidia Geforce RTX 5070 Ti, VRAM 12gb GDDR7,
SSD - M.2 PCIe NVME 1Tb, OLED WQXGA 2560x1600.


-
- Posts: 22559
- Joined: Sat, 23. Apr 05, 21:42
Re: XML Editor recommendations?
All the options mentioned so far are available for Windows.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.
Insanity included at no extra charge.
There is no Box. I am the sand.
-
- Posts: 1088
- Joined: Fri, 20. Jul 18, 23:20
Re: XML Editor recommendations?
No, I'm not averse to killing SCA, I just don't have the resources to do it yet. They also have a pirate base in the sector and I would have to fly past it to get to my station. Right now I only have a S ship and an M trader.LameFox wrote: ↑Thu, 20. Feb 25, 07:09 Out of curiosity are you averse to just killing the stations? Because removing SCA with violence is actually super easy. Laying some friend/foe mines on its defensive modules and marking it hostile will completely neuter it, so if you have taken even one SCA destroyer at some point—itself very easy to do—you can just leave it to clean up the rest.
-
- Posts: 1088
- Joined: Fri, 20. Jul 18, 23:20
Re: XML Editor recommendations?
Thank you. I used to use kdiff3 until I found the plugin for Notepad++. It's nice to have one tool for many purposes though.alt3rn1ty wrote: ↑Thu, 20. Feb 25, 22:24I found Sublime text does the keep open the last tabs thing like Windows new notepad does, which irked me a bit but got used to it.user1679 wrote: ↑Thu, 20. Feb 25, 06:07 Thanks everyone for the suggestions. I probably should have mentioned I'm using Windows.
This looks like it might work, it loaded the file as flat text so I had to switch it to XML on the 'syntax' menu. It did take a while to parse the XML but at least I could collapse nodes and the "find" option didn't take hours like Notepad++ did. ~alt3rn1ty wrote: ↑Wed, 19. Feb 25, 17:25 Sublime text is supposed to be good, handles big files nicely.
https://www.sublimetext.com/
Also worth a mention if you want to Diff two files side by side, Sublime text has a bit of a different way of doing things ..
You dont need any Compare extension like Notepad++ used to:
Navigate to the folder containing both files through Open Folder... or in a project
Select the two files (ie, by holding Ctrl on Windows or ⌘ on macOS) you want to compare in the sidebar
Right click and select the Diff files... option.
Someone did a screen animation showing the Diff option being used from the Sidebar ..
https://forum.sublimetext.com/t/sublime ... iles/68872
I didn't mention too much about it initially (you can lead a horse to water etcetera), but I think Sublime text is the best text editor I have ever used.
-
- Posts: 3643
- Joined: Tue, 22. Oct 13, 15:26
Re: XML Editor recommendations?
I wouldn't expect the other station to intervene, as long as you don't set a fire override that aggros it unintentionally. Or at least they've never done that for me. It seems like a pretty short radius that they turn hostile when you attack them, and even then, sometimes they don't actually help each other.user1679 wrote: ↑Fri, 21. Feb 25, 06:03No, I'm not averse to killing SCA, I just don't have the resources to do it yet. They also have a pirate base in the sector and I would have to fly past it to get to my station. Right now I only have a S ship and an M trader.LameFox wrote: ↑Thu, 20. Feb 25, 07:09 Out of curiosity are you averse to just killing the stations? Because removing SCA with violence is actually super easy. Laying some friend/foe mines on its defensive modules and marking it hostile will completely neuter it, so if you have taken even one SCA destroyer at some point—itself very easy to do—you can just leave it to clean up the rest.
One thing you can do to acquire SCA-cleaning assets quickly is to go to a system where BUC operates. Pious Mists IV has been a good one for me. You've probably noticed BUC have those RADAR-reduced Eclipse Vanguards lurking in some areas, like the mineral trail there. These are the friendly individuals who kill your satellites. Your starting S ship ought to be capable of bailing these as, unlike BUC's larger patrol groups, these ships don't travel together. After you cap a few and sell a few (and I presume your M ship is off trading too) you should be able to take one to clear surface elements off an SCA destroyer in a neutral area, and call in a few others to help get the shields down. Then, bail its crew (slow going but you only need do it once), and cap it when only the pilot is left. An optional extra step is taking some SCA medium ships for greater firepower, as these shouldn't be hard to bail in an Eclipse.
At that point you are ready to go. As long as you buy a few mines and blow up their defence modules first, your destroyer basically can't fail.
***modified***
-
- Posts: 1088
- Joined: Fri, 20. Jul 18, 23:20
Re: XML Editor recommendations?
Thanks for the advice. I've not had much luck getting pilots to bail lately, though I was mostly trying to get an L trader so maybe they like holding on to their ships more than S combat pilots. A bit of good fortune though, before I came to reply, HOP and ARG were in a battle in Second Contact and I found a couple S fighters and a M trader abandoned by HOP.LameFox wrote: ↑Fri, 21. Feb 25, 06:20I wouldn't expect the other station to intervene, as long as you don't set a fire override that aggros it unintentionally. Or at least they've never done that for me. It seems like a pretty short radius that they turn hostile when you attack them, and even then, sometimes they don't actually help each other.user1679 wrote: ↑Fri, 21. Feb 25, 06:03No, I'm not averse to killing SCA, I just don't have the resources to do it yet. They also have a pirate base in the sector and I would have to fly past it to get to my station. Right now I only have a S ship and an M trader.LameFox wrote: ↑Thu, 20. Feb 25, 07:09 Out of curiosity are you averse to just killing the stations? Because removing SCA with violence is actually super easy. Laying some friend/foe mines on its defensive modules and marking it hostile will completely neuter it, so if you have taken even one SCA destroyer at some point—itself very easy to do—you can just leave it to clean up the rest.
One thing you can do to acquire SCA-cleaning assets quickly is to go to a system where BUC operates. Pious Mists IV has been a good one for me. You've probably noticed BUC have those RADAR-reduced Eclipse Vanguards lurking in some areas, like the mineral trail there. These are the friendly individuals who kill your satellites. Your starting S ship ought to be capable of bailing these as, unlike BUC's larger patrol groups, these ships don't travel together. After you cap a few and sell a few (and I presume your M ship is off trading too) you should be able to take one to clear surface elements off an SCA destroyer in a neutral area, and call in a few others to help get the shields down. Then, bail its crew (slow going but you only need do it once), and cap it when only the pilot is left. An optional extra step is taking some SCA medium ships for greater firepower, as these shouldn't be hard to bail in an Eclipse.
At that point you are ready to go. As long as you buy a few mines and blow up their defence modules first, your destroyer basically can't fail.
-
- Posts: 3643
- Joined: Tue, 22. Oct 13, 15:26
Re: XML Editor recommendations?
L/XL pilots will never bail. You can slowly bail out all their other crew (it might take a while before they start to leave, especially with destroyers) but the pilot will remain. However if they're the last one in the ship you only need one marine, so early on when you haven't much resources or skilled marines it's a viable if slow way to get things like destroyers.user1679 wrote: ↑Sat, 22. Feb 25, 04:54Thanks for the advice. I've not had much luck getting pilots to bail lately, though I was mostly trying to get an L trader so maybe they like holding on to their ships more than S combat pilots. A bit of good fortune though, before I came to reply, HOP and ARG were in a battle in Second Contact and I found a couple S fighters and a M trader abandoned by HOP.LameFox wrote: ↑Fri, 21. Feb 25, 06:20I wouldn't expect the other station to intervene, as long as you don't set a fire override that aggros it unintentionally. Or at least they've never done that for me. It seems like a pretty short radius that they turn hostile when you attack them, and even then, sometimes they don't actually help each other.
One thing you can do to acquire SCA-cleaning assets quickly is to go to a system where BUC operates. Pious Mists IV has been a good one for me. You've probably noticed BUC have those RADAR-reduced Eclipse Vanguards lurking in some areas, like the mineral trail there. These are the friendly individuals who kill your satellites. Your starting S ship ought to be capable of bailing these as, unlike BUC's larger patrol groups, these ships don't travel together. After you cap a few and sell a few (and I presume your M ship is off trading too) you should be able to take one to clear surface elements off an SCA destroyer in a neutral area, and call in a few others to help get the shields down. Then, bail its crew (slow going but you only need do it once), and cap it when only the pilot is left. An optional extra step is taking some SCA medium ships for greater firepower, as these shouldn't be hard to bail in an Eclipse.
At that point you are ready to go. As long as you buy a few mines and blow up their defence modules first, your destroyer basically can't fail.
***modified***