public class ParserOptionsTest {
private static final Abdera abdera = new Abdera();
@Test
public void testIgnoreComments() {
Parser parser = abdera.getParser();
ParserOptions options = parser.getDefaultParserOptions();
ParseFilter filter = new SimpleParseFilter();
filter.setIgnoreComments(true);
options.setParseFilter(filter);
Document<Feed> doc = parser.parse(ParserOptionsTest.class.getResourceAsStream(
"/parseroptionstest.xml"), options);
assertTrue(abdera.getXPath().selectNodes("//comment()", doc).isEmpty());
}