0

In my ant script i have a property which contains XML format string.

For example i get this property using this call:

<exec executable="svn" outputproperty="svnout">
    <arg value="proplist"/>
    <arg value="-v"/>
    <arg value="--xml"/>
</exec>

So my svnout property contains following value:

<?xml version="1.0" encoding="UTF-8"?>
<properties>
<target
   path=".">
<property
   name="svn:ignore">.git&#13;
*.iml&#13;
</property>
</target>
</properties>

I need to get content of element and i don't want to save this property in file.

xmlproperty task is not applicable here, because it reads from file, but i need to read from memory. Is there any way to parse XML property without writing it on disk?

Architect
  • 155
  • 2
  • 11

1 Answers1

0

You could use XSLT to parse the XML file returned by subversion in a manner similar to the following answer:

But I think you should consider using an embedded script to parse the XML.

Community
  • 1
  • 1
Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185