JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • XML basics and namespaces

    JAVA 25 SELF
    47 level,0 lecture
    A short, practical introduction to XML: basic structure (elements, attributes, text nodes, comments, CDATA), what the prolog is, and most importantly — why namespaces are needed and how to declare and use them via the xmlns and xmlns:prefix attributes. We’ll unpack prefixes, the default namespace ( xmlns= "URI"), mixing different “vocabularies” in one document, and typical parsing mistakes.
    Open
  • Working with DOM and SAX: XML parsing

    JAVA 25 SELF
    47 level,1 lecture
    In this lecture, we cover two classic approaches to parsing XML: the tree-based DOM and the event-driven SAX. You will learn to read and modify documents via the tree ( Document, Element, NodeList) and to process large files in a streaming manner with event handlers ( SAXParser, DefaultHandler, startElement/ characters/ endElement). We will show the pros and cons of each approach, practical examples, and discuss common pitfalls (memory, text splitting in characters, attempts to modify XML in SAX).
    Open
  • StAX (Streaming API for XML) — streaming parsing

    JAVA 25 SELF
    47 level,2 lecture
    Breaking down XML streaming parsing with StAX: how the pull model differs from the SAX push approach, how to create a parser via XMLInputFactory and read events from XMLStreamReader in a loop with reader. next() calls, what event types exist ( START_ELEMENT, CHARACTERS, END_ELEMENT, END_DOCUMENT), and when StAX is preferable to DOM/ SAX. Plus: a comparison table, a Mermaid diagram, and a review of common mistakes (stream leaks, element nesting, exceptions XMLStreamException, IOException).
    Open
  • Working with XML via JAXB: basics and annotations

    JAVA 25 SELF
    47 level,3 lecture
    How to use JAXB (Jakarta XML Binding) to convert Java objects to XML and back: key annotations @XmlRootElement, @XmlElement, @XmlAttribute, @XmlType, @XmlTransient; core classes JAXBContext, Marshaller, Unmarshaller; formatting via the property Marshaller.JAXB_FORMATTED_OUTPUT. We cover Maven dependencies for Java 11+ ( jakarta.xml.bind-api, jaxb-runtime), working with collections and nested objects, controlling element order ( propOrder), excluding fields, and common pitfalls.
    Open
  • Configuring XML Serialization: Custom Adapters

    JAVA 25 SELF
    47 level,4 lecture
    How to teach JAXB to serialize “non-standard” types and present data in the required format: use the @XmlJavaTypeAdapter annotation and write custom adapters based on XmlAdapter<ValueType, BoundType>. We’ll cover date formatting ( LocalDate → "dd.MM.yyyy"), numbers ( BigDecimal), working with collections, moving values into attributes via @XmlAttribute, elements via @XmlElement, and excluding fields with @XmlTransient. We’ll practice serializing/deserializing via Marshaller/ Unmarshaller and go through common pitfalls.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy