Basically, what I am trying to do is to convert the XML Metadata into displaying as Structured Text, and if possible, how to not have to do this on a manual basis, if that makes sense.
This is an example of the XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SWG_Resource_Dump xmlns="generated at: Tue, 04 Jan 2022 11:59:57">
<resource>
<name>Haufa</name>
<available_date>Tue, 04 Jan 2022 11:59:59</available_date>
<resource_class>Thoranium Steel</resource_class>
<stats>
<CR>310</CR>
<CD>242</CD>
<DR>681</DR>
<HR>726</HR>
<MA>116</MA>
<OQ>903</OQ>
<SR>646</SR>
<UT>629</UT>
</stats>
<planets>
<planet>corellia</planet>
<planet>dantooine</planet>
<planet>dathomir</planet>
<planet>endor</planet>
<planet>lok</planet>
<planet>rori</planet>
<planet>talus</planet>
<planet>yavin 4</planet>
</planets>
</resource>
</SWG_Resource_Dump>
And this is an example of how I would like it structured and formatted in txt:
Name: Nygao
Available: Tue, 04 Jan 2022 11:59:57
CR: 310
CD: 242
DR: 681
HR: 726
MA: 115
OQ: 903
SR: 646
UT: 629
Planet(s): Corellia, Dantooine, Dathomir, Endor, Lok, Rori, Talus, Yavin
((Some kind of a line break))
I hope all this makes sense, and I would appreciate the feedback. Thanks!