I've been using XML instead of INI for a long time ...
Link: viewtopic.php?t=74233
XML problem with my Config file
Re: XML problem with my Config file
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: XML problem with my Config file
Thanks for all the help. I've no written a part to parse a json file. Quite easy when I found a huge json file example somewhere on this forum.
But how would I parse this?
I got this far;
then I had no idea, and the help file is not much helpful when I have no idea, what is Child, Parent Node and so on.
But how would I parse this?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Ini_Structure>
<MinutesFromTheBeginning>233335017</MinutesFromTheBeginning>
<MonthsInYear>14</MonthsInYear>
<HourInDay>24</HourInDay>
<MinutesInHour>60</MinutesInHour>
<DaysInWeek>8</DaysInWeek>
<NameOfDays>
<element>Morrasday</element>
<element>Nirmoday</element>
<element>Yranday</element>
<element>Janmarday</element>
<element>Turenday</element>
<element>Ermaday</element>
<element>Ulvakday</element>
<element>Cortenday</element>
</NameOfDays>
<NameOfMonths>
<element>Solan</element>
<element>Dellios</element>
<element>Rande</element>
<element>Varian</element>
<element>Mosicante</element>
<element>Uliande</element>
<element>Horitan</element>
<element>Belizadore</element>
<element>Koloss</element>
<element>Jarajan</element>
<element>Polokk</element>
<element>Quartani</element>
<element>Romante</element>
<element>Morvika</element>
</NameOfMonths>
<DaysInMonths>
<element>24</element>
<element>26</element>
<element>26</element>
<element>33</element>
<element>32</element>
<element>32</element>
<element>29</element>
<element>32</element>
<element>31</element>
<element>27</element>
<element>32</element>
<element>28</element>
<element>28</element>
<element>26</element>
</DaysInMonths>
</Ini_Structure>
Code: Select all
Result = LoadXML(#PB_Any,XFilename)
FreeXML(Result)
Re: XML problem with my Config file
Same as in JSON:
ExtractXMLStructure(Knoten, *Puffer, Struktur [, Flags])
ExtractXMLStructure(Knoten, *Puffer, Struktur [, Flags])
Re: XML problem with my Config file
Thanks, didn't even know of ExtractJSONStructure, used a lot of code to parse the file, then ExtractXMLStructure appeared and all my code could just be deleted.. 
Is there a Command like this For INIFile aswell?
Is there a Command like this For INIFile aswell?

