I managed to clean up things a bit: ``` val articl...
# dsl
b
I managed to clean up things a bit:
Copy code
val articleList = reader.document {
            element("PubmedArticle") {
                PubmedArticle().apply {
                    element("MedlineCitation").element("PMID", "Article") {
                        if (it == "PMID") pmid = allText("PMID")
                        else if (it == "Article") {
                            element("Journal", "Abstract") {
                                if (it == "Journal") journalTitle = tagText("Title")
                                else if (it == "Abstract") abstract = allText("Abstract")
                            }
                        }
                    }
                }
            }
        }