Given the following xml:
Content A
Content A
<
xmlpeek
only reads values.
xmlpoke
only sets values.
Unfortunately, nant does not have an xmldelete task.
I solved this issue by creating a nant
in a nant file I can easily re-use between project.
I chose to leverage nant's built-in
,
,
and
tasks.
Below is how to include and call this target. Keep in mind the all the parameters are global and must be defined before calling the target.
delete.from.file.path
: the path of the file to be modified.delete.from.file.regex
: the regex matching what to removed (and defining BEFORE and AFTER groups).