### Question:
StringFilterXmlParser { public StringFilterConfig parse() throws DocumentException { StringFilterConfig config = new StringFilterConfig(); SAXReader reader = new SAXReader(); Document doc = reader.read(configPath.toFile()); Element root = doc.getRootElement(); for (Iterator i = root.elementIterator("filter-str"); i.hasNext(); ) { Element element = (Element) i.next(); String isActive = element.attributeValue("isactive"); if (isActive != null && isActive.toLowerCase().equals("true")) { config.setActive(true); } for (Iterator rules = element.elementIterator("path"); rules.hasNext(); ) { Element ruleElement = (Element) rules.next(); String path = ruleElement.attributeValue("value"); config.setPath(path); } for (Iterator rules = element.elementIterator("language"); rules.hasNext(); ) { Element ruleElement = (Element) rules.next(); String path = ruleElement.attributeValue("value"); config.getLanguageWhiteList().add(path); } } return config; } StringFilterXmlParser(Path configPath); StringFilterConfig parse();  }### Answer:
@Test public void test() throws DocumentException { AabResGuardXmlParser parser = new AabResGuardXmlParser(loadResourceFile("demo/config.xml").toPath()); AabResGuardConfig config = parser.parse(); System.out.println(config.getStringFilterConfig().toString()); }