Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1316.Text sort -- How to sort some segments in xml file?

User: Dilip -- 2015-09-01          << 1315  1317 >>
Hits: 3089
Type: Text sort   
Search all Text sort examples
Description:
Within the elements tree found in the xml, there are different variations each  
variation has a size in alphanumerics like 36, 36.5, X, XL. All elements do not have  
line breaks for variations. What I want to do is arrange them according to Ascending  
order according to size along with other details like price sku intact 
 
<ELEMENTS>
Input Sample:
<ELEMENTS> 
<variation> 
 
<SIZE>36</SIZE> 
 
<sku>1386-2411-W_36</sku> 
 
<STOCK>1</STOCK> 
 
<retail_price>650</retail_price> 
 
<SALE_PRICE>552</SALE_PRICE> 
 
<discount>15</discount> 
</variation> 
<variation> 
 
<SIZE>38</SIZE> 
 
<sku>1386-2411-W_38</sku> 
 
<STOCK>1</STOCK> 
 
</variation> 
<variation> 
 
<SIZE>36.5</SIZE> 
 
<sku>1386-2411-W_36.5</sku> 
<STOCK>1</STOCK> 
</variation> 
 
Output Sample:
<ELEMENTS> 
<variation> 
 
<SIZE>36</SIZE> 
 
<sku>1386-2411-W_36</sku> 
 
<STOCK>1</STOCK> 
 
<retail_price>650</retail_price> 
 
<SALE_PRICE>552</SALE_PRICE> 
 
<discount>15</discount> 
</variation> 
<variation> 
 
<SIZE>36.5</SIZE> 
 
<sku>1386-2411-W_36.5</sku> 
<STOCK>1</STOCK> 
</variation> 
<variation> 
 
<SIZE>38</SIZE> 
 
<sku>1386-2411-W_38</sku> 
 
<STOCK>1</STOCK> 
 
</variation> 
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 'search for pattern' to: 
  
* set 'replace with pattern' to: 
 
3. click 'replace', done. 

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all specified links from a html file? (58%)
How to extract all image links from a html file? (58%)
How to sort and delete duplicate lines of a text file? (57%)
How to extract all c++ comments from multiple cpp files? (56%)
How to remove some specified characters from multiple filenames? (56%)
How to count number of digits(0-9) in a text file? (56%)
How to convert the text from hex to decimal in a file? (56%)
How to Random insert one or three line to a text file? (55%)

Check Demo of Text sort
Keywords:
segme  within  price  line breaks  size  xml  xml file  line break  break  range  xml join  replace text in xml  xml search replace  replace xml  file size  sort words text file  different words  each line to replace different