From the course: Learn API Documentation with JSON and XML

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Advanced XML

Advanced XML

From the course: Learn API Documentation with JSON and XML

Start my 1-month free trial

Advanced XML

- [Instructor] Let's touch on some more advanced concepts of XML that you might run into, such as comments, namespaces, formatting, and schemas. Comments are useful for putting in information for other humans to read because they are ignored by the computer. XML comments are done the same way as HTML comments. Comments start with an open angle bracket, an exclamation point, and two dashes, and they end with two dashes and a closing angle bracket. Everything in between these groups of characters is ignored by the computer reading the XML. Here's an example of a comment. Each tag in an XML file should have a unique name, however, you might have a tag naming one thing in one context, and mean something else in a different context. For this, you use namespaces to uniquely identify each tag. To use a namespace, just prefix it with a namespace followed by a colon. For example, I could use the namespace education for a tag like onlineCourse. As I mentioned in the JSON lecture, white space…

Contents