I have this example xml file
<page>
<title>Chapter 1</title>
<content>Welcome to Chapter 1</content>
</page>
<page>
<title>Chapter 2</title>
<content>Welcome to Chapter 2</content>
</page>
I like to extract the contents of title tags and content tags.
Which method is good to extract the data, using pattern matching or using xml module. Or is there any better way to extract the data.
There is already a built-in XML library, notably
ElementTree. For example: