ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 28681] - [PATCH] Xml output for the SQL task
Date Tue, 25 May 2004 15:12:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28681>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28681

[PATCH] Xml output for the SQL task





------- Additional Comments From nicolaken@apache.org  2004-05-25 15:12 -------
I've refactored this stuff to use an external "extractor". 
This is how it works with the current patch:

  <taskdef name="extractorxml" 
      classname="org.apache.tools.ant.taskdefs.SQLExtractorXML"/>   

  <extractorxml id="myextractorxml"/> 
  
    <sql driver="..."
         url="..."
         userid="..."
         password="..."
         print="yes"
         output="${work.dir}/outputfile.xml"
         extractorRef="myextractorxml"
    >
      ${data.sql}
    </sql>

If I want to use nesting for the xml output, I have to tell the extractor, not
the sql task, thus effectively separating the chores:

  <extractorxml id="myextractorxml" nestLevel="2"/>

I have not refactored out the CSV extraction to maintain compatibility with
previous versions, so in practice only extra output extractors need to be
defined this way.

WDYT?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message