How can I turn the structure of an XML file into a folder structure using ANT

Posted by 1ndivisible on Stack Overflow See other posts from Stack Overflow or by 1ndivisible
Published on 2010-04-28T17:58:21Z Indexed on 2010/04/29 2:57 UTC
Read the original article Hit count: 592

Filed under:
|
|
|

I would like to be able to pass an XML file to an ANT build script and have it create a folder structure mimicking the nodal structure of the XML, using the build files parent directory as the root.

For Example using:

<root>
    <folder1>
         <folder1-1/>
    </folder1>
    <folder2/>
    <folder3>
         <folder3-1/>
    </folder3>
</root>

ant would create:

folder1
   -folder1-1
folder2
folder3
   -folder3-1 

I know how to create a directory, but i'm not sure how to have ANT parse the XML.

© Stack Overflow or respective owner

Related posts about ant

Related posts about folder