XML Software
Both theory and practice will be covered in this page. A full tutorial that shows step-by-step what to do, and explain why.
We will have a brief look on the most used software for XML editing and how to install them, alongside functionality for XML editing. Check the links and install one software!
Overview
As you have seen earlier, XML is easy to read and can be edited with basically any text editor. However, it is important to have basic XML functionality, such as automatically adding closing tags (usually called "auto-completion").
Highlighting common mistakes, such as incorrect closing tags as shown in this example, is another important feature of any XML editor.
WARNING: Text editors don't come with XML functionality by default, you must install extensions or plugins to do so.
We will explain below:
Option 1: Notepad++
N++ is lightweight, minimalist, and fast. It's mostly just a text editor. For XML functionality you must install a plugin called XML Tools, here's a discussion on how to do it, with screenshots.
For dark mode, you can go to Settings>Style Configuration, and select either of the two first options of the Select Theme dropdown box.
Go the official website to download the latest version.
This is how Notepad++ normally looks:
Option 2: VSCode
Also known as Visual Studio Code. VSC, for a text editor, is a bit heavier, but still fast and perfectly usable for RimWorld modding. It can work for coding, but we are focusing on XML editing only. For XML functionality, press Ctrl+Shift+X to access the Extensions tab, then in the Search bar look for "XML", specifically by Red Hat:
In essence, it works pretty similar to Notepad++. They both can be easily interchangeable.
Go the official website to download the latest version.
This is how VSCode looks by default:
Other options
There are some other options, like SublimeText, which is also perfectly usable. But there's no much difference anyway, and the page would never end because of the several alternatives out there.
Setting up a workspace
(This section applies after you have installed a XML editing software)
When working with XML, we often need to look for Defs and references in the base game, instead of looking for them manually in folders, one by one, you can try setting up a workspace with the XML editing software you have, then use the Search or Find tool (depending on your software) to look for the Defs or names you need.
In VSCode
1) File>Open Folder>Select RimWorld main folder, usually at C:\Program Files (x86)\Steam\steamapps\common\RimWorld
>Select Folder
2) Ctrl+Shift+F
Notepad++
Not exactly a workspace, this is the closest thing you will get.
Ctrl+F>"Find in Files" tab>Write whatever in "Find what" field>Directory "[...]" button, Select RimWorld main folder>Select Folder>Find All