Down-Translating XML: The Python Way

Authors Alberto Simões , José João Almeida

Thumbnail PDF


  • Filesize: 0.53 MB
  • 9 pages

Document Identifiers

Author Details

Alberto Simões
  • 2Ai – School of Technology, IPCA, Barcelos, Portugal
José João Almeida
  • Centro ALGORITMI, Departamento de Informática, University of Minho, Braga, Portugal

Cite AsGet BibTex

Alberto Simões and José João Almeida. Down-Translating XML: The Python Way. In 11th Symposium on Languages, Applications and Technologies (SLATE 2022). Open Access Series in Informatics (OASIcs), Volume 104, pp. 15:1-15:9, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2022)


Nowadays, the most used approach to process an XML file is based on the processing of a DOM structure and a set of operations that collects or edits information in the model using some kind of selectors (usually CSS-like or XPath). Nevertheless, the process of performing a depth-first walk through the DOM, and synthesizing values, is a simple way to traverse and transform an entire XML document. In this document we discuss the details on the implementation and usage of a Python package for XML document processing based on this structure. Given the existence of similar tools for other programming languages, we will mainly focus on the used approach, that takes advantage of the Python style guides and development patterns.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Extensible Markup Language (XML)
  • Software and its engineering → Scripting languages
  • XML
  • Python
  • Depth-First Processing


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. José João Almeida and José Carlos Ramalho. XML::DT a perl down-translation module. In XML-Europe'99, Granada - Espanha, May 1999. Google Scholar
  2. Steven Bird, Edward Loper, and Ewan Klein. Natural Language Processing with Python. O'Reilly Media Inc., 2009. Google Scholar
  3. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional Computing Series. Pearson Education, 1994. URL:
  4. Ian Hickson, John Williams, Daniel Glazman, Peter Linss, Elika Etemad, and Tantek Çelik. Selectors level 3. W3C recommendation, W3C, November 2018. URL:
  5. Daniel Jurafsky and James H. Martin. Speech and Language Processing (2Nd Edition). Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 2009. Google Scholar
  6. Jonathan Robie, Josh Spiegel, and Michael Dyck. XML path language (XPath) 3.1. W3C recommendation, W3C, March 2017. URL:
  7. Alberto Simões. XML Parsing in JavaScript. In Ricardo Queirós, Mário Pinto, Alberto Simões, José Paulo Leal, and Maria João Varanda, editors, 6th Symposium on Languages, Applications and Technologies (SLATE 2017), volume 56 of OpenAccess Series in Informatics (OASIcs), pages 9:1-9:10, Dagstuhl, Germany, 2017. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik. URL: