User: visitmyharbour -- 2016-03-03 << 1349 1351 >> |
Hits: 2578 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to extract info from xml value and generate a text with new format? And append result from multiple xml files to a single file. |
Input Sample: |
... <na>0002-0.png</na> ... <x>3201</x> <y>4878</y> ... <sc>3000000</sc> ... <lon>-13.792023</lon> <lat>62.8363656</lat> ... <lon>3.4175712</lon> <lat>62.8363656</lat> ... <lon>3.4175712</lon> <lat>48.1665479</lat> ... <lon>-13.792023</lon> <lat>48.1665479</lat> |
Output Sample: |
[0002-0.BMP] NA=0002-0.png FN=0002-0.BMP GR=0 PY=0 QU=0 SC=3000000 BC=4 B1=62.8363656,-13.792023 B2=62.8363656,3.4175712 B3=48.1665479,3.4175712 B4=48.1665479,-13.792023 CC=4 C1=0,0,62.8363656,-13.792023 C2=3201,0,62.8363656,3.4175712 C3=3201,4878,48.1665479,3.4175712 C4=0,4878,48.1665479,-13.792023 GD=WGS84 NU= PR=1 DS=0,0 WI=3201 HE=4878 DX=0 DY=0 LAT0=0 LON0=0 DT=0 LATS=0 LATN=0 DU=1 PC=0 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue * set 'replace with pattern' to: * change the ">" to ">>" to the left of "output file" * click 'advanced' tab, set 'run following for each matched unit' to: 4. click 'batch...' open 'batch runner' window (1) drag multiple files to 'batch runner' window (2) set "set outputfile name" to result file, like "CHARTCAL.DIR" (3) click 'batch replace', done |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |