Could you model an office building in XML?
Experience Level: Medior
Tags: Data FormatsXML
Answer
Well, the answer depends on the imagination of the candidate.
What would be nice to see in the answer?
- Multiple elements/tags
- List of elements
- Attributes
- Indentation
Solution example
<building>
<name>Office Building XYZ</name>
<address>
<city>Prague</city>
<country>Czech Republic</country>
</address>
<floors>
<floor name="Ground floor">
</floor>
<floor name="Floor 1">
</floor>
<floor name="Floor 2">
</floor>
</floors>
</building>
Related Data Formats job interview questions
What are the advantages/disadvantages of the XML format?
Data FormatsXML JuniorWhat is this format good for? Where is it used? Can you provide some examples?
Data FormatsXML Junior