There are a few paths to take in order to learn DFDL depending on your goals and background. This page provides resources allowing you to learn by working your way through labs that gradually introduce DFDL concepts, or you can plunge right into well-crafted DFDL schemas for basic data formats, and gradually work up to more complex ones.
There is a general Overview Presentation about DFDL with sections about:
The remaining sections are perhaps less interesting for DFDL beginners.
Reading Section 1(the introduction) of the DFDL Specification is also a basic introduction to DFDL.
There are several things that you need to be familiar with to learn DFDL. These include:
Daffodil supports both JSON and XML, but the learning/training materials are very biased towards using XML.
DFDL uses a subset of the XML Schema Definition Language (XSDL or XSD) to express the structure of data, meaning the field names, their order, and nesting of hierarchical structure. This means that a DFDL Schema is an XML Schema.
If you are familiar with the notion of a grammar or BNF, XML Schema is conceptually similar. It is more verbose, but provides standardized places to add annotations to the schema which allows DFDL to add the data format information onto the schema in a standard way.
You will need to be familiar with these concepts:
DFDL uses these terms often:
There is also a Glossary of DFDL Terms in the DFDL Specification.
There are training courses for DFDL which include hands-on lab exercises.
To do hands-on learning of DFDL you will want to interact with many of the open-source DFDL schema projects on github.
You will need to download and install these tools:
If you are familiar with the VSCode IDE, you may also want to install:
Many developers use their preferred Java IDE such as JetBrains IntelliJ IDEA. Others like the low level approach of just using the Daffodil Command Line Interface (CLI).
The CSV to Bin course has 7 labs starting from CSV (Comma Separated Values) and creating variants of it eventually ending with simple binary data examples. This course was intended to take 3 days, the last day being implementation of the NTP (Network Time Protocol) message format.
You can review the slides which accompany the labs.
The FakeTDL DFDL Training course has 5 labs all of which are about developing your own version of the Fake TDL data format starting from its specification document. On completion the DFDL schema should be equivalent to the official FakeTDL DFDL Schema.
You can review the slides which accompany the labs.
There are several simple DFDL Schemas that are well-structured, follow best-practices, include self-testing, and so serve as good starting points for learning DFDL.
If a data layout diagram like this one for NTP (Network Time Protocol) doesn't intimidate you, then perhaps you will want to just dig directly into:
ntp-type.dfdl.xsd file.Another publicly available schema intended to help with understanding of binary data, specifically military messaging formats, is:
The MIL-STD-2045 Header Schema is a useful example showcasing:
There are a variety of other materials on the Internet that provide some DFDL training:
Note: AI bots like ChatGPT and Gemini don't know much about DFDL yet. (as of December 2025)
The DFDL language is designed to allow large DFDL schemas to be created as compositions of other schemas. Large complex schemas can be built up as assemblies of component schemas. This way a library of reusable DFDL component schemas can be built up and reused. Each component can be developed and tested in isolation.
The DFDLSchemas site has these schemas which provide an extensive example of the techniques for composing a larger DFDL schema from smaller components:
A slide deck on Schema Composition illustrates the nesting of DFDL schema payload components with surrounding DFDL schema headers/envelopes, which are also components.
Most uses of Apache Daffodil will embed it within a data processing system by way of its API. As of Daffodil 4.0.0 there is only a Java API for Daffodil, though it is usable from other JVM languages such as Scala. Prior versions of Daffodil had a Java API and a separate Scala API. All the API documentation is available on this site via links such as:
Examples showing how to use the API from Java are available on the OpenDFDL site. See: