Guides / What is define.xml?
What is define.xml?
Your define.xml is the guide to your study data. It tells a reviewer what each dataset and variable is, where each value came from, and which list of allowed values it uses.
What a define.xml file holds
A define.xml is one XML file that sits next to your datasets. It follows the CDISC Define-XML standard and describes, for each dataset:
- Datasets: the name (like DM or AE), a label, what one record stands for, and the key variables that make each record unique.
- Variables: the name, label, type (text, integer, date and so on), length, and whether a value is required.
- Origin: where each value came from. Collected on the case report form (with page numbers in the annotated CRF), derived, assigned, or taken from another dataset.
- Codelists: the allowed values for a variable, such as M and F for SEX, often tied to CDISC Controlled Terminology by an NCI code.
- Value-level metadata: details that change by row. For example, LBORRES for glucose has a different unit and type than LBORRES for a urine colour test.
- Methods and comments: how a derived value was worked out, and anything else a reviewer needs to know.
Why define.xml matters to a reviewer
A reviewer opens your define.xml first. If it says AGE is an integer but your DM dataset holds text, or it lists a codelist your data doesn't follow, the reviewer has to stop and ask. FDA's Study Data Technical Conformance Guide asks for a define.xml with each study sent in a CDISC standard, so checking your define.xml and your datasets together saves a round of questions.
Define-XML versions: 1.0, 2.0 and 2.1
| Version | Published | What changed |
|---|---|---|
| 1.0 | 2005 | The first version. Labels, origins and comments are attributes, and value-level rows have no where clause. |
| 2.0 | 2013 | Where clauses for value-level metadata, origins as elements, links to codelists with NCI codes. |
| 2.1 | 2019 | Standards and their versions listed in the file, more origin types, comments on codelist terms. |
Check the FDA Data Standards Catalog for the versions accepted for your submission date.
Common define.xml mistakes
- A variable in the data that isn't in define.xml, or the other way round.
- Type or length in define.xml that doesn't match the dataset.
- Values in the data that aren't in the codelist define.xml names.
- References that lead nowhere: a method, comment or codelist ID that isn't defined.
- A file saved in one character encoding but labelled as another, so curly quotes and accents turn into odd symbols.
How to open and read a define.xml
A define.xml usually comes with a stylesheet (an .xsl file) that turns it into a web page when you open it in a browser. That depends on a browser feature called XSLT, which Google plans to remove from Chrome. Our checker reads define.xml without XSLT, so you can open it in Chrome or Firefox, follow every link, see the problems it found, and save it as one offline web page.
Questions about define.xml
Is define.xml required for an FDA submission?
FDA's Study Data Technical Conformance Guide asks for a define.xml with each study sent in SDTM, ADaM or SEND. Read the current guide and the FDA Data Standards Catalog for your submission date.
What's the difference between define.xml and define.pdf?
define.xml is the machine-readable file that describes your datasets. A define.pdf is a printable copy. Reviewers and tools work from define.xml.
Can I check my define.xml without uploading it?
Yes. Our checker reads your define.xml in your browser tab on your computer. The file isn't sent to us.
This guide is general information to help you understand the standards. It isn't official FDA or CDISC guidance; read the published documents for your submission.