Read XML file and create a list of swipe "buttons" right/left

Hi Forums

Is it possible in SwiftUI to read simple XML output from a server like this below, that then can be changed into a list of "swipe" buttons/navigations in iOS or Mac, where if I swipe to the right it shows a Blue-"Open" and if I Swipe left It shows a Red-"Close" a bit like it is in the iOS "Mail" App.

The Open and Close I in general need to pass on for other code to open or close this particular Environment.

The list should only show the names of each object seen in the XML, aka like Animals.hwe I want also to strip out .hwe and only show the name e.g. Animals, I have first of all been tinkering with Hstack and Vstack, but I do not get something like I would want it to be so I'm a bit lost at the moment, anyone have some snippets that does this reading of XML?


My Sample XML:

Code Block
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Objects>
<Object type="Environment">
<name>environments\Animals.hwe</name>
<type>Environment</type>
</Object>
<Object type="Environment">
<name>environments\ArtWorks.hwe</name>
<type>Environment</type>
</Object>
<Object type="Environment">
<name>environments\Desktops.hwe</name>
<type>Environment</type>
</Object>
<Object type="Environment">
<name>environments\DigitalSignage.hwe</name>
<type>Environment</type>
</Object>
<Object type="Environment">
<name>environments\FlightControl.hwe</name>
<type>Environment</type>
</Object>
<Object type="Environment">
<name>environments\startup.hwe</name>
<type>Environment</type>
</Object>
</Objects>


Br
Michael
Read XML file and create a list of swipe "buttons" right/left
 
 
Q