From 8c71dedd85f236333a5c58e9335177ea181e0ce2 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 21 Jan 2024 18:44:26 +0900 Subject: [PATCH] =?UTF-8?q?XmlMeta=E3=81=AE=E3=83=91=E3=83=BC=E3=82=B9?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/utils/impl/XmlMetaParserImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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;