As part of a recent project, I was converting a KML (Keyhole Markup Language) file to a GPX (GPS Exchange Format) file which required the extraction of longitude, latitude and elevation coordinates into a comma delimited string format. After extracting the <coordinates> into a string, the string needed to be parsed into three fields. As data could vary in size up to millions of coordinates, this necessitated a method that would not impact on process time nor create memory issues when converting a delimited string into fields.
Whilst it is simple to convert a text file to fields easily, it is converting an available delimited string into different text fields that requires a changed approach. Other scripting languages’ built in techniques makes it really easy to parse text into different formats. Delphi requires a slight difference in approach to achieve the same.
Feel free to get the full story at Bayesean Blog.