I have data in an XML file of some 2500 lines where I want to extract/parse only a small section into a swiftui view. An example of the data I need is below. It exists on my local bundle as file test.xml:
...other data before...
<memorandums>
<memorandum identification="ABC" pilot="2" text="ABC TEXT" time="00:02:00"/>
<memorandum identification="DEF" pilot="1" text="DEF TEXT" time="00:05:00"/>
<memorandum identification="GHI" pilot="1" text="GHI TEXT" time="00:10:00"/>
</memorandums>
...other data after...
I would like an output into a swiftui view that takes the strings inside each memorandum and displays them like this:
ABC - ABC TEXT - 00:02:00
DEF - DEF TEXT - 00:05:00
GHI - GHI TEXT - 00:10:00
There are multiple XML files from the system I am using with a varying number of memos, so I need something that is able to be flexible and perhaps loop? through the memos and parse into swift.
I'm a complete rookie and have built some basic navigation views for my project, but this data part is beyond my knowledge and I've searched the internet far and wide for a solution with no avail! Any suggestions would be greatly appreciated. Thanks!