CodeGym
AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme

Lessons

  • Reviews
  • About us
Start
Start learning
Start learning now
  • My Progress
  • Courses
  • University
  • Quest Map
  • Lessons
  • XML: elements, attributes, text, and well‑formed rules

    Kotlin SELF
    Level 50, Lesson 0
    We break down XML as a data format: how elements and the document tree are structured, why attributes and self-closing tags are needed, why spaces and line breaks become data, which rules make a document well‑formed, and how to safely insert text via entities ( &, <) and the escapeXmlText function. At the end—hands-on practice generating an XML report and common mistakes that make the parser refuse to work.
    Available
  • DOM parsing: Document, Element, attributes, and textContent

    Kotlin SELF
    Level 50, Lesson 1
    We break down DOM parsing of XML in Kotlin on the JVM: how to turn XML into a Document tree via DocumentBuilderFactory and parse(), how to work with Element and NodeList, read attributes via getAttribute() and text via textContent, and also how to write “non-crashing” code with as?, ?:, trim(), and toDoubleOrNull().
    Available
  • XPath over the DOM

    Kotlin SELF
    Level 50, Lesson 2
    We break down how to use XPath on top of the DOM in Kotlin: why you might want it instead of “manual tree traversal”, how the XML → Document → XPath queries pipeline is structured, what evaluate modes exist (string and NODESET), how to work with a NodeList, and how in practice to import a list of entities (example: expenses) from XML without turning the code into a mess of getElementsByTagName and item(0).
    Available
  • XSD: why you need a schema and conformance validation

    Kotlin SELF
    Level 50, Lesson 3
    We break down why XML documents need a contract in the form of XSD: how well-formed XML differs from schema- valid XML, how a schema is structured ( xs:schema, required attributes and types), and how to validate documents on the JVM using the SchemaFactory → Validator pipeline. We show minimal Kotlin functions, exception handling ( try/ catch), as well as typical mistakes and the limits of what XSD can do.
    Available
  • XSLT: the idea of transformations and a minimal pipeline

    Kotlin SELF
    Level 50, Lesson 4
    We break down how XSLT differs from XPath, how to think in terms of “input XML + templates → output”, and how to run a transformation on the JVM/Kotlin via the standard pipeline: TransformerFactory → Transformer → transform(...). We will show a minimal working example, the “ XML → text” and “ XML → XML” variants, working with StreamSource/ StreamResult, as well as practical tips for diagnosing errors and common pitfalls.
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym