[jdom-interest] How to combine two xml files

Muthu Vel muthuvel_is at yahoo.com
Wed Jan 28 23:08:43 PST 2004


Hai,
I am having two xml files build.xml and deploy.xml. I have to combine these files to form config.xml. I have given the format for the xml files below.

build.xml
-------------
<!DOCTYPE project PUBLIC "-//ANT//DTD project/EN" "build.dtd">
<project name="${project.name}" default="init" basedir=".">
<target name="init" depends="build.properties" description="Initialize the build properties">
<property file="build.properties"/>
</target>
</project>

deploy.xml
---------------
<?xml version="1.0" ?>
<!DOCTYPE project PUBLIC "-//ANT//DTD project/EN" "build.dtd">
<project name="${project.name}" default="init" basedir=".">
<target name="init" description="Initialize the deploy properties">
<property file="deploy.properties"/>
</target>
</project>

Two files are having a lot of targets. I have to differentiate the targets of both files. For that I have to add a new attribute "location" to all targets. The problem is how to add a location attribute. Can anyone faced this? If so tell me the procedure for solving the problem. The Output file should be of the form
 
config.xml
---------------
<?xml version="1.0" ?>
<!DOCTYPE project PUBLIC "-//ANT//DTD project/EN" "build.dtd">

<target name="init" description="Initialize the build properties" location = "build.xml">
<property file="build.properties"/>
</target>

<target name="init" description="Initialize the deploy properties" location = "deploy.xml">
<property file="deploy.properties"/>
</target>

Thanks in Advance,
    SMVEL


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040128/862fc328/attachment.htm


More information about the jdom-interest mailing list