diff --git a/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java b/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java index 60263d68..3f9cdc82 100644 --- a/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java +++ b/utils/src/main/java/one/nem/lacerta/utils/impl/XmlMetaParserImpl.java @@ -17,6 +17,8 @@ import one.nem.lacerta.utils.LacertaLogger; public class XmlMetaParserImpl implements XmlMetaParser{ + String TAG = getClass().getSimpleName(); + @Inject LacertaLogger logger; @@ -35,13 +37,18 @@ public class XmlMetaParserImpl implements XmlMetaParser{ meta.setRevisionId(rootElement.getElementsByTagName("revisionId").item(0).getTextContent()); ArrayList pages = new ArrayList<>(); - for(int i = 0; i < rootElement.getElementsByTagName("pages").getLength(); i++) { + for (int i = 0; i < rootElement.getElementsByTagName("page").getLength(); i++) { Element pageElement = (Element) rootElement.getElementsByTagName("page").item(i); XmlMetaPageModel page = new XmlMetaPageModel(); page.setFilename(pageElement.getElementsByTagName("filename").item(0).getTextContent()); pages.add(page); } + logger.debug(TAG, "Parsed Meta: " + meta.getRevisionId() + " " + pages.size() + " pages."); + for (XmlMetaPageModel page : pages) { + logger.debug(TAG, "\tPage: " + page.getFilename()); + } + meta.setPages(pages); return meta;