Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

ANT xml file copy

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am new to this forum and need someone assistance to get it achieve my requirement in ANT. I hope someone would be able to help me. my requirement is, I have two xml file, for example A.xml and B.xml.
I want to find a line and copy all the content after that line and should be paste in another xml file. example, in my A.xml file I have written 1000 lines. if I consider 50th line content as a key word, I should be able to identify 50th line and copy all the lines after that 50th line up to 100th line and should be able to paste in B.xml 50th line where I mentioned the line content as a key word in B.xml file.  Can anyone help me to find a way to achieve this requirement.

Thanks in advance!
 
author & internet detective
Posts: 40198
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend exploring BSH (BeanShell) or a custom Java task for this.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic