noobprogrammer 0 Newbie Poster

Hi everyone here,

Can someone please guide me in transforming XML-to-SQL output with Python?

I need to create 2 tables (Books and Patrons) into SQL. How much i suppose to start with???

<?xml version="1.0" ?>
<Books>
<Item>
<BookID>A001</BookID>
<Title>A Tale of Two Cities</Title>
<Author>Charles Dickens</Author>
<Language>English</Language>
<Year>1859</Year>
<Quantity>5</Quantity>
</Item>
<Item>
<BookID>A002</BookID>
<Title>The Lord of the Rings</Title>
<Author>J. R. R. Tolkien</Author>
<Language>English</Language>
<Year>1954</Year>
<Quantity>5</Quantity>
</Item>
<Item>
<BookID>A003</BookID>
<Title>The Hobbit</Title>
<Author>J. R. R. Tolkien</Author>
<Language>English</Language>
<Year>1937</Year>
<Quantity>4</Quantity>
</Item>
<Item>
</Books>

<?xml version="1.0" ?>
<Patrons>
<Item>
<PatronID>U001</PatronID>
<Name>Peter</Name>
<Gender>Male</Gender>
<Age>20</Age>
<BorrowedBookID>A001</BorrowedBookID>
</Item>
<Item>
<PatronID>U002</PatronID>
<Name>Mary</Name>
<Gender>Female</Gender>
<Age>18</Age>
<BorrowedBookID>None</BorrowedBookID>
</Item>
<Item>
</Patrons>