更新时间:2023-11-21 17:01:58
我用这个http://www.oopsconsultancy.com/software/xmltask/在过去的处理与ANT XML。我扔得到各个属性的共同快速的样品。
I've used this http://www.oopsconsultancy.com/software/xmltask/ in the past to process XML with ANT. I threw together a quick sample of getting each individual attribute.
<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
<xmltask source="test.xml">
<call path="psf/project">
<param name="ref" path="@ref"/>
<actions>
<echo>ref = @{ref}</echo>
</actions>
</call>
</xmltask>
不知道这是否会满足您的需求,但它的工作单独获得属性值。
Not sure if this will suit your needs, but it does work to get the attribute values individually.