String pagesFile = targetDir + File.separator + "html" + File.separator + "WEB-INF" + File.separator + "pages.xml";
try
{
builder = factory.newDocumentBuilder();
builder.setEntityResolver(new PagesResolver());
document = builder.parse(new File(pagesFile));
NodeList pageList = document.getElementsByTagName("pages");
Node pagesNode = pageList.item(0);