Brian,

I tried asking this question before - you answered the question correctly but I asked it incorrectly!  Here's the updated question:

If I have a list of properties that I'm storing in xml like this:

<map-array name="properties">
  <entries>
    <string name="name" value="status-display-dispatched" />
    <string name="value" value="Earmarked" />
  </entries>
  <entries>
    <string name="name" value="status-display-contacted" />
    <string name="value" value="Contacted" />
  </entries>
  <entries>
    <string name="name" value="status-display-travelling" />
    <string name="value" value="Travelling" />
  </entries>
  ...

How can I individually update each <string name="value"> element?  I might want to change only two of the above properties, to look like this:

<map-array name="properties">
  <entries>
    <string name="name" value="status-display-dispatched" />
    <string name="value" value="Assigned" />
  </entries>
  <entries>
    <string name="name" value="status-display-contacted" />
    <string name="value" value="Notified" />
  </entries>
  <entries>
    <string name="name" value="status-display-travelling" />
    <string name="value" value="Travelling" />
  </entries>
  ...

Thanks,
TimM



The below tries to remove the path //entries/string for the given
attribute value You should be able to specify a similar predicate thus
(note: I haven't tried this)

<remove path="//entries[string/@value='properties']"/>

which should remove //entries where string/@value='properties'.

Please let me know if this works or not for you.

Brian

Timothy D. McKernan wrote:
> I have a series of elements called <entries>. Inside each one of these is
> another element that labels the entries.
>
> <entries>
> <string name="name" value="properties"> </string>
> </entries>
> <entries>
> <string name="name" value="ErrorForm"> </string>
> </entries>
>
> To give an example. Can I use xmltask to replace one of those entries?
>
> In English I want to say: replace the <entries> element IF it contains a
> <string> element whose value attribute is "properties".
>
> I tried specifying it like this:
> <remove path="//entries/string[@value='properties'/..]" />
>
> but got this error:
>
> Applying RemovalAction() to
> //entries/string[@value='SERVICEMobilityProperties'/..]
> [xmltask] javax.xml.transform.TransformerException: ERROR! Unknown op
> code: 21
>
> Is there a way for me to remove this element?
>
> Thanks,
> T
>