nerdexam
Cisco

200-901 · Question #623

What does a developer import in a script to parse a file from XML to Python?

The correct answer is B. library. To parse XML data in Python, a developer typically imports a library that provides the necessary functions and methods for XML parsing. Libraries for XML Parsing: Python has several libraries for parsing XML, such as xml.etree.ElementTree, lxml, and minidom. Functionality…

Software Development and Design

Question

What does a developer import in a script to parse a file from XML to Python?

Options

  • Afunction
  • Blibrary
  • Cvariable
  • Dmethod

How the community answered

(29 responses)
  • A
    7% (2)
  • B
    86% (25)
  • C
    3% (1)
  • D
    3% (1)

Explanation

To parse XML data in Python, a developer typically imports a library that provides the necessary functions and methods for XML parsing. Libraries for XML Parsing: Python has several libraries for parsing XML, such as xml.etree.ElementTree, lxml, and minidom. Functionality: These libraries offer functions and methods to read, manipulate, and extract data import xml.etree.ElementTree as ET tree = ET.parse('file.xml') root = tree.getroot()

Topics

#Python programming#XML parsing#Libraries#Scripting fundamentals

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice