Skip to content
Snippets Groups Projects
Commit 5c1c9b2f authored by Goik Martin's avatar Goik Martin
Browse files

Loop -> Stream

parent 3a5118a1
No related branches found
No related tags found
No related merge requests found
......@@ -37,8 +37,6 @@ public class DomXpath {
final XPathExpression<Element> xpath = XPathFactory.instance().compile("//img", new ElementFilter());
final List<Element> images = xpath.evaluate(htmlInput);
for (final Element image: images) {
System.out.print(image.getAttributeValue("src") + " ");
}
images.forEach(img -> System.out.print(img.getAttributeValue("src") + " "));
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment