Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <store>
- <bookstore>
- <book>
- <title lang="en">IT book</title>
- <author>Some IT Guy</author>
- </book>
- </bookstore>
- </store>
- root = et.parse('Template.xml').getroot()
- bookstore = root.find('bookstore')
- book = root.find('bookstore').find('book')
- for bk in bks:
- book.find('Title').text = bk
- books.append(book)
- book[0].append(book) and book[-1].append(book)
Add Comment
Please, Sign In to add comment