My input json file looks something like this

```
{"id":1,"author":"abc","title":"xyz"}
{"id":2,"author":"def","title":"mno"}

```

I want a python script to create a xml file that looks like this

```
<sequence>
<id>1</id>
<author>abc</author>
<title>xyz</title>
</sequence>
<sequence>
<id>2</id>
<author>def</author>
<title>mno</title>
</sequence>

```

Right now this is the code I'm using

```
import json as j
with open("test.json") as json_format_file: 
  d = j.load(json_format_file)
import xml.etree.cElementTree as e
r = e.Element("sequence")
e.SubElement(r,"id").text = d["id"]
e.SubElement(r,"submitter").text = d["submitter"]
e.SubElement(r,"authors").text = str(d["authors"])
e.SubElement(r,"title").text = str(d["title"])

a = e.ElementTree(r)
a.write("json_to_xml.xml")

```

Problem is that it only works for 1 entry, and if i have more than 1 entry in the JSON file, it throws an error. How can I make this run for multiple entries and write it all into the xml file?

EDIT:
Have changed my JSON file to look like this

```
[{"id":1,"author":"abc","title":"xyz"},
{"id":2,"author":"def","title":"mno"}]

```