Python Programming - Reading and Writing Files - Discussion

Discussion Forum : Reading and Writing Files - General Questions (Q.No. 49)
49.
How can you check if a file named "data.xml" is a valid XML file?
if is_valid_xml("data.xml"):
if is_xml_file("data.xml"):
if validate_xml("data.xml"):
if os.path.isxml("data.xml"):
Answer: Option
Explanation:
Checking if a file has an XML extension to determine if it's a valid XML file.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.