VTD-XML declareVariableExpr invalid char #

29 Views Asked by At

I want to declare a variable Expression with the function declareVariableExpr(..,..) but in the value of my variable I have the "#" character. VTD returns an error for this char, saying it is an invalid char. Anyone can help me to resolve this problem please ?

String idproduct=text("./product");//with an # like: myidproductvalue#245315
ap.declareVariableExpr("id",idproduct);
ap.SelectXpath("./ProductData/Data/keyId[text()='$id']/parent::node()");
if(ap.evalXpath()!=-1){
.....
}

It returned me , this error :

com.ximplemware.XPATHParseException : Invalid Char in name token: 
myidproductvalue#245315; @position16
0

There are 0 best solutions below