Model structured documents with elements, attributes, namespaces, schemas, parsing, and transformations.
Lessons
Transform between XML and JSON structures.
Converting XML and JSON is easiest to learn by reading the example, changing it, and observing the result.
<!-- XML -->
<lesson level="beginner">
<title>XML Basics</title>
<minutes>30</minutes>
</lesson>
/* Equivalent JSON */
{
"lesson": {
"level": "beginner",
"title": "XML Basics",
"minutes": 30
}
}Practice the Converting XML and JSON example in a small scratch file, then explain what changed and why.