Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <TaskLifetimeList ml-is-active="">
- <TaskLifetimes>
- <TaskLifetime>...</TaskLifetime>
- <TaskLifetime>...</TaskLifetime>
- <TaskLifetime>...</TaskLifetime>
- <TaskLifetime>
- <Comments>
- <![CDATA[
- подготовить ]]>
- </Comments>
- <IsPublic>True</IsPublic>
- <Date>19.04.2018 13:00:19</Date>
- <EditorId>9017</EditorId>
- <Editor>ААААААААААААА</Editor>
- <Executors>ВВВВВВВВВВ</Executors>
- <ExecutorsGroup>БББББББББББ</ExecutorsGroup>
- <Participants>АААААА</Participants>
- <StatusId>35</StatusId>
- </TaskLifetime>
- <TaskLifetime>...</TaskLifetime>
- <TaskLifetime>...</TaskLifetime>
- </TaskLifetimes>
- <Paginator>...</Paginator>
- </TaskLifetimeList>
- public List<Date> getDates() throws IOException, ParseException {
- SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
- Document document = Jsoup.connect("some-url").get();
- Elements elements = document.select("TaskLifetimeList TaskLifetimes TaskLifetime");
- List<Date> dates = new ArrayList<>();
- for (Element item : elements) {
- if (item.select("ExecutorsGroup").size() > 0) {
- String stringDate = item.selectFirst("Date").text();
- dates.add(format.parse(stringDate));
- }
- }
- return dates;
- }
Add Comment
Please, Sign In to add comment