• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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: 39343
755
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!