This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Im using ANT and the replaceregexp target, and I am editing an xml file. I am using a properties file (but not completly essential if someone has an idea) to hold the values of what I want to replace text with.
I want to replace 1 tag in my xml file, and put another whole set of tags in its place, but I need to know how to make a new line character in the xml file to break up the new tags. I have tried to use the \ n character (with no space) and it doesnt make a new line, in fact, it doesnt even render anything, its like i didnt even put it in there.
Well, normally if you're going to do major surgery on an XML file using Ant, you'd probably want to use the XSLT Ant task rather than take the text-editor approach.
IIRC, however, the OS-dependent newline character (sequence) is available as a Ant property along with all the other standard JVM properties (see Sun's JavaDocs for java.lang.System.getProperty).
Customer surveys are for companies who didn't pay proper attention to begin with.
Natasha QA
Greenhorn
Joined: Jul 03, 2002
Posts: 1
posted
0
Use this in the replace attribute instead of \n:
${line.separator}
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.