I need your help to sort my problem out, coding with Swift on XCode 14.1 :
When trying to parse an XML file, I noticed that most of values are not trimmed and appears in the XML file with some trailing spaces such as name="ABC " and number of spaces is not always the same. It's randomely from 3 to 6 or 7 spaces.
For example, when I execute the following code :
let subIndexer = xml["Objects"]["Points"]["Point"]
.filterAll { elem, _ in elem.attribute(by: "name")!.text == "ABC" }
...it doesn't find my element of course as it's "ABC " in the XML. How can I do ?
I thank you in advance !