Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 43535461D for ; Fri, 17 Jun 2011 15:13:56 +0000 (UTC) Received: (qmail 75206 invoked by uid 500); 17 Jun 2011 15:13:55 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 75153 invoked by uid 500); 17 Jun 2011 15:13:54 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 75145 invoked by uid 99); 17 Jun 2011 15:13:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 15:13:54 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ddevienne@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bw0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jun 2011 15:13:48 +0000 Received: by bwz16 with SMTP id 16so2325294bwz.4 for ; Fri, 17 Jun 2011 08:13:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=aLS/ihF5c26/oU2eyZtal6Hl/Wp8pKZJ0Vbi9ZqyYqc=; b=jtCLHzLTk58EH5tDbDC3LC32I5vtBn+UnMSH1j+4JItAKjag5FUATEBveeIlC2K0qq igtSzL6An2sjqXlHIZTxJewRydLLwIPp/oru3RPE3ncsvdwvaE7mQzQ2aRCYbSBWWrI3 5IOA7v0dqs5C8G8EsltL6Acm3Fd/0kzo4ir94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Vs53KHI1Ke5gZUL8yBaFHiye9qjyXzAr7WmO/PxvYA9hxX6C7WlBqT4C3FbD51ZK3e x6OcDAocxuq2cPchw5K1o2jKRZ6cxwLB3oBXfxpA9RKF65XukWDn5r55jXV+QAvi/rdy sa8AsSGXqVAYmRXJ9Qic+Wp8VAOCi6FWLyTgM= MIME-Version: 1.0 Received: by 10.204.14.147 with SMTP id g19mr1838551bka.11.1308323606598; Fri, 17 Jun 2011 08:13:26 -0700 (PDT) Received: by 10.204.23.11 with HTTP; Fri, 17 Jun 2011 08:13:26 -0700 (PDT) In-Reply-To: <4DFAD8B2.8080806@gmail.com> References: <4DFAD8B2.8080806@gmail.com> Date: Fri, 17 Jun 2011 10:13:26 -0500 Message-ID: Subject: Re: Programatic ANT: Export Build.xml From: Dominique Devienne To: Ant Users List Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jun 16, 2011 at 11:31 PM, Dark Before Dawn wrote: > I would like to use apache-ant-1.8.2 in JavaSE, to generate build.xml Files > dynamically. Is there a way to export a Project Object as xml File via > Writer/Stream? Nope. And I don't think it's possible (or easy) to do either, at least in the generic case. IMHO you're better off building an in-memory DOM tree for the build.xml and serializing that instead. Ant has no real concept of an AST that'd represent the full build file "info set" like typical compilers, from which it would be easy to "printy print" back to a text file. Thanks, --DD --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org