def _crawl_elsevier_and_find_main_xml(self):
self.found_articles = []<EOL>if not self.path and not self.package_name:<EOL><INDENT>for doc in self.conn.found_articles:<EOL><INDENT>dirname = doc['<STR_LIT>'].rstrip('<STR_LIT>')<EOL>try:<EOL><INDENT>self._normalize_article_dir_with_dtd(dirname)<EOL>self.found_articles.append(dirname)<EOL><DEDENT>except Exception as err:<EOL><INDENT>register_exception()<EOL>print("<STR_LIT>" % (dirname, err))<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>def visit(dummy, dirname, names):<EOL><INDENT>if "<STR_LIT>" in names and "<STR_LIT>" in names:<EOL><INDENT>try:<EOL><INDENT>self._normalize_article_dir_with_dtd(dirname)<EOL>self.found_articles.append(dirname)<EOL><DEDENT>except Exception as err:<EOL><INDENT>register_exception()<EOL>print("<STR_LIT>" % (dirname, err))<EOL><DEDENT><DEDENT><DEDENT>walk(self.path, visit, None)<EOL><DEDENT>
A package contains several subdirectory corresponding to each article.
An article is actually identified by the existence of a main.pdf and
a main.xml in a given directory.