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/[EMAIL 
> PROTECTED]'properties'/..]" /> 
>
> but got this error: 
>
> Applying RemovalAction() to 
> //entries/[EMAIL PROTECTED]'SERVICEMobilityProperties'/..]
>   [xmltask] javax.xml.transform.TransformerException: ERROR! Unknown op 
> code: 21 
>
> Is there a way for me to remove this element? 
>
> Thanks,
> T
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Xmltask-users mailing list
> Xmltask-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xmltask-users
>   

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd         brian @ oopsconsultancy.com
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to