nerdexam
Cisco

200-901 · Question #584

Which data structure is created when parsing XML data in Python?

The correct answer is D. dictionary. When parsing XML data in Python (commonly using libraries like xmltodict or processing with xml.etree.ElementTree and converting the result), the XML elements and attributes are mapped into a Python dictionary structure. Keys represent XML tag names and attributes, while values…

Understanding and Using APIs

Question

Which data structure is created when parsing XML data in Python?

Options

  • Aitem
  • Blist
  • Clibrary
  • Ddictionary

How the community answered

(41 responses)
  • A
    2% (1)
  • C
    2% (1)
  • D
    95% (39)

Explanation

When parsing XML data in Python (commonly using libraries like xmltodict or processing with xml.etree.ElementTree and converting the result), the XML elements and attributes are mapped into a Python dictionary structure. Keys represent XML tag names and attributes, while values represent the nested content. This makes XML data easy to traverse and manipulate using standard Python dictionary operations. The dictionary is the idiomatic Python data structure for representing hierarchical key-value data derived from XML.

Topics

#XML Parsing#Python#Data Structures#API Data Formats

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice