You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Mauro Molinari (JIRA)" <ji...@apache.org> on 2018/02/28 15:54:00 UTC

[jira] [Issue Comment Deleted] (GROOVY-1832) XMLParser: remove method on NodeList returns true (success). But, Node is not removed.

     [ https://issues.apache.org/jira/browse/GROOVY-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mauro Molinari updated GROOVY-1832:
-----------------------------------
    Comment: was deleted

(was: Indeed, what I observe, is {{Collection.removeAll(Closure)}} orĀ {{Collection.findAll(Closure)}} followed by {{Collection.removeAll(Collection)}} do remove nodes from the NodeList they are invoked on, but if I then take the root node of the NodeList ({{config}} in you example) and write it on a file, I still find all the original nodes (3 nodes in your example). I'm still struggling to find a way to achieve what I need...)

> XMLParser: remove method on NodeList returns true (success).  But, Node is not removed.
> ---------------------------------------------------------------------------------------
>
>                 Key: GROOVY-1832
>                 URL: https://issues.apache.org/jira/browse/GROOVY-1832
>             Project: Groovy
>          Issue Type: Improvement
>          Components: XML Processing
>    Affects Versions: 1.0
>         Environment: Windows XP.    Eclipse 3.2.
>            Reporter: Ricky Gomez
>            Assignee: Paul King
>            Priority: Minor
>             Fix For: 1.1-rc-1
>
>         Attachments: XmlParserRemoveTest.groovy
>
>
> Using XMLParser:
> node.nodelist.remove(o)  returns true.   But node is not removed.
> I think the node.nodelist.remove(o) syntax is preferred to o.parent().value.remove(o) which does work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)