final byte[] rawContent = string.getBytes();
InputStream input = new ByteArrayInputStream(rawContent);
try {
//create the parser
Configuration configuration = new OGCConfiguration();
Parser parser_1_0_0 = new Parser(configuration);
filter = (Filter) parser_1_0_0.parse(input);
} catch (Exception e) {
//parsing failed, try with a Filter 1.1.0 parser
try{