Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Core features
- 3 Advanced features
- 4 Parser builders
- 5 XML processing
- 6 GUI programming
- 7 Concurrent programming
- 8 On paths and a bit of algebraic abstraction
- 9 Virtual files coming into existence
- 10 Compositional file matching
- 11 Searching, iterating, traversing
- 12 The expression problem
- 13 A computer algebra system
- Appendix A Multimedia processing
- Appendix B Distributing a Scala application along with Scala itself
- Appendix C Working with the compiler and the interpreter
- Appendix D Scala's grammar
- References
- Name index
- Subject index
5 - XML processing
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Core features
- 3 Advanced features
- 4 Parser builders
- 5 XML processing
- 6 GUI programming
- 7 Concurrent programming
- 8 On paths and a bit of algebraic abstraction
- 9 Virtual files coming into existence
- 10 Compositional file matching
- 11 Searching, iterating, traversing
- 12 The expression problem
- 13 A computer algebra system
- Appendix A Multimedia processing
- Appendix B Distributing a Scala application along with Scala itself
- Appendix C Working with the compiler and the interpreter
- Appendix D Scala's grammar
- References
- Name index
- Subject index
Summary
XML, the eXtensible Markup Language, is an industry standard for document markup. XML has been adopted in many fields that include software, physics, chemistry, finance, law, etc. XML is used to represent data that are interchanged between different operating systems while most configuration files in many operating systems are XML files. The widespread use of XML dictated the design and implementation of tools capable of handling XML content. Scala is a modern programming language and so it includes a standard library for the manipulation of XML documents. This library, which was designed and implemented by Burak Emir, is the subject of this chapter.
What is XML?
A markup is an annotation to text that describes how it is to be structured, laid out, or formatted. Markups are specified using tags that are usually enclosed in angle brackets. XML is a meta-markup language, that is, a language that can be used to define a specific set of tags that are suitable for a particular task. For example, one can define tags for verses, stanzas, and strophes in order to express poems in XML. When a specific set of tags is used to describe entities of a particular kind, then this set is called an XML application. For example, if one precisely specifies tags suitable to describe poems and uses them only for this purpose, then the resulting set of tags is an XML application.
- Type
- Chapter
- Information
- Steps in ScalaAn Introduction to Object-Functional Programming, pp. 187 - 201Publisher: Cambridge University PressPrint publication year: 2010