Since English is not my native language, I will try to make the things easier by making examples.
I have built a xml within my project to collect all of the infomations that the user need during the usage. It's already done and valid, can be read by machine. Everything until this point is OK. But my XML file is a bit of chaotic for the human (for machine makes no difference), like so
<root>
<tag1>
<tag1-1>
</tag1-1>
</tag1><tag2>
<tag2-2>
</tag2-2>
</tag2><tag3>
</tag3><tag4>
</tag4>
</root>
the above example should demostrate the situation that I have. The XML file is actually valid and for the machine correct. However, this XML file should be able to read by a human too. So with the real XML file I have has more than 1000 lines, it's not clean and not acceptable. Even with help of some texteditor like Notepad++ or VS code, I still can't read it quickly because I can't extend or close the tags (and I think it's also because of the chaotic format).
What I want is something like this:
<root>
<tag1>
<tag1-1>
</tag1-1>
</tag1>
<tag2>
<tag2-2>
</tag2-2>
</tag2>
<tag3>
</tag3>
<tag4>
</tag4>
</root>
This is a lot easier for the user to read or with help of some text editor.
Since the XML file is actually valid and correct for the machine. I would think about, if there is some kind of extern library to clean up the mess, like:
xmlDoc.cleanTheMess()
But atfer I did a lot of search, I didn't find anything like that. So if someone has dealed this problem before, maybe give me some advise, it would be very nice.