commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: [JXPath] Set a property in the whole graph
Date Wed, 11 Feb 2009 20:02:54 GMT

String xpath = "descendant-or-self::id";
for (Iterator<Pointer> it = context.iteratePointers(xpath); it
        .hasNext();) {
    it.next().setValue(null);
}

HTH,
Matt

--- On Wed, 2/11/09, Adrian Mitev <adrian.mitev@googlemail.com> wrote:

> From: Adrian Mitev <adrian.mitev@googlemail.com>
> Subject: [JXPath] Set a property in the whole graph
> To: user@commons.apache.org
> Date: Wednesday, February 11, 2009, 5:43 AM
> Hi all! I'm new to JXPath. Is there an easy way to
> traverse the entire
> object graph and set all properties with name 'id'
> to null? Could not
> find something similar in the user's guide.
> 
> -- 
> Although nobody can come back and make a new start, anyone
> can start
> now and make a new end
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail:
> user-help@commons.apache.org


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message