Extract method: getXmlForEntries.

The duplicate code between getXmlForIndexPage and getXmlForDetailPage
could be extracted to an extra method.

Note: this could change the indentation in the created xml file a bit.
Since xml files don't depend on indentation, this change causes no
problems and is worth it.