Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1350.Advanced search and replace -- How to extract info from xml value and generate a new format text?

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


Similar Examples:
How to extract first line from multiple files and generate a new file? (69%)
How to make math calculation on columns and generate a new column of result? (59%)
How to extract all specified date format from a text file? (59%)
How to extract and join text from multiple files with user defined format? (56%)
How to extract A1~A5 from txt file with following format? (54%)
How to extract and join line 1 and line2 and remove/delete rest of lines in a text file? (54%)
How to extract all lines with numbers from many text files? (53%)
How to calculate the minimum and maximum value in each line of text? (53%)

Check Demo of Advanced search and replace
Keywords:
xml files  xml file  xml  utf  append  ppen  dir  result  single file  single  batch change multiple xml files  extract xml  extract from xml  search and replace xml batch  batch change xml  batch search and replace xml  batch search and replace xml file  xml batch replace