DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1

Extensible Markup Language (XML) is a markup
language that encodes information between descriptive
tags. XML is a superset of Hypertext Markup Language
(HTML), which was originally designed to describe the
formatting of web pages served by servers through
HTTP. The encoded information is defined within user-
defined schemas that enable any data to be transmitted
between systems. An entire XML document is stored as
text, and it is both machine readable and human
readable.


Example 7-1 shows a sample XML response document.
As you can see, with XML, you can assign some meaning
to the tags in the document. You can extract the various
attributes from the response by simply locating the
content surrounded by and


; this content is technically known as the
element.
Example 7-1 XML Data Format

Click here to view code image


<?xml version="1.0" encoding="UTF-8" ?>
<root>
<home>this is my house</home>
<home>located in San Jose, CA</home>
<rooms>
<living_room>true</living_room>
<kitchen>false</kitchen>
<study_room>
<size>20x30</size>
</study_room>
<study_room>
<desk>true</desk>
</study_room>
<study_room>
<lights>On</lights>
</study_room>
</rooms>
</root>

JSON

Free download pdf