commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CANDAT Jerome" <jerome.can...@c-s.fr>
Subject [JXPath] Problem while removing nodes
Date Mon, 03 Nov 2003 17:17:51 GMT
Hello everyone,

I'm trying to remove nodes from my XML file using JXPath.

I'm doing the following :

context.getVariables().declareVariable("sourcePath", sourcePath); // sourcePath being a string
and correspond to an attribute in my XML
context.removePath("//project[@sourcePath=$sourcePath]");

If I replace the $sourcePath string by 'D:/TEST/' for example it works... But if sourcePath
is "D:/TEST" it doesn't work...

I get the following error :

org.apache.commons.jxpath.JXPathException: Exception trying to remove xpath file://project[@sourcePath=$popol];
Cannot remove an object that is not some other object's property or a collection element.

Has anyone an idea?

Thanks in advance,
Jérôme.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message