kunal
Posts: 4
Nickname: kunal
Registered: Jul, 2003
|
|
ANT task
|
Posted: Aug 18, 2003 1:56 AM
|
|
Advertisement
|
Hi,
I am trying to execute an anttask.I have defined it in build.xml using <taskdef> element.
In <taskdef> I have given four attributes,reuqired as input parameters to the java program implementing the task.
Foll. is the <taskdef>
<taskdef name="xmltask" classname="Mytask"/> <xmltask filename="C:\\Anttask\\xpath\\contentMap.xml" query="/ContentMap/Content/Schema/Table[@ID='VKVMACK']/KeyValue[@ID='NAMA']" attributeid="ID" attrvalue="aaaa"/>
In the task I am parsing the given file using DOM.When I am trying to get the root element it is giving
doc = [#document: null]
But when I configure this task as java task in the build.xml it does not give the null,instead it prints the xml.
<java classname="Mytask" fork="yes"> <classpath path="${classpath}"/> <arg value="C:\\Anttask\\xpath\\contentMap.xml"/> <arg value="/ContentMap/Content/Schema/Table[@ID='VKVMACK']/KeyValue[@ID='NAMA']"/&g t; <arg value="ID"/> <arg value="aaaa"/> </java>
Can anybody please tell me what is going wrong while executing the task by <taskdef>
Bye,
Kunal
|
|