Hello. Is your input an actual XML file or is it a text file containing all the "[api]" and extra text as indicated?
If it's pure text, you'll probably need to investigate using <filterchain> to remove the unwanted text, using a regex pattern to match all the text you don't want - or all the text you do want - and then exporting the amended result. There is a promising-looking starting point in this thread at Code Ranch (http://www.coderanch.com/t/108154/tools/edit-files-through-ant). -----Original Message----- From: Vinodh Kumar [mailto:vinoh...@gmail.com] Sent: 28 November 2011 07:19 To: user@ant.apache.org Subject: Stripping Contents from XML Hi, Can I know how to achieve with ant? Basically I need xml tag content from [api] <Servers> to [api] </Servers> as output Any hint? * [api] DBTime is 20111128005710 [api] Invoking api: getServerList, expectedtofail: false [api] <?xml version="1.0" encoding="UTF-8"?> [api] <Servers> [api] <Server Id="homeid" Name="home" [api] Status="Active" Type="IntegrationAgentServer"/> ....... [api] </Servers>* to * [api] <Servers> [api] <Server Id="homeid" Name="home" [api] Status="Active" Type="IntegrationAgentServer"/> ....... [api] </Servers>* --Vinodh Kumar -- View this message in context: http://ant.1045680.n5.nabble.com/Stripping-Contents-from-XML-tp5027993p5027993.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com ______________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org