I have a defaultdict(list).. So, data structure of following format:
1:[1,2,3,4,5]
2:[2,3,4]
I want to generate the following xml
<html>
<page>
<src>1</src>
<links>
<link>1</link>
<link>2</link>
...
<link>5</link>
</links>
</page>
<page>
<src>2</src>
<links>
<link>2</link>
<link>3</link>
<link>4</link>
</links>
</page>
<html>
And then write an indented xml to file