For example: <name>002C34</name> needs to become <name>C</name> or <name>003B33</name> become <name>B</name>
Is XMLUpdater the best transformer to edit multiple waypoints in a .GPX file. I need to change hundreds of unique waypoint names in a .GPX file to a few names based on a alpha character in the those original way point names.
Page 1 / 1
Hi, I'm not familiar with both of GPX format and XMLUpdater, but I think that you can use simply StringReplacer if "name" can be treated as an attribute of the GPX data. Read the original data with GPX] reader, change each "name" by StringReplacer and write changed data with GPX] writer. In addition, other transformer (e.g. StringSearcher) might be also available instead of StringReplacer. Hope this helps.
takashi:
Thanks for the tip and I am part way there. I have been able to "find" the text I want in the waypoint name but I am struggling to find comprehensive documentation for an Advanced Regular Expression to define the replacement text for all of the way point name, with just a shorter letter code. The StringReplacer does a good job of editing the found string in the way point name but it is not easy to replace the entire way point name with a single letter code. FMEpedia does not provide very many examples that I can find.
Cheers
Rob
Hi Rob, If "name" which you need to change always consists of three parts: one or more digits], only one capital letter] and one or more digits] StringReplacer with the following settings would work, for example. Attributes: name Text to Find: :0-9]+(+A-Z])]0-9]+ Replacement Text: \\1 Use Regular Expressions: yes And you can see detailed documentation about regular expressions here: http://www.regular-expressions.info/
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.