daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <store>
  2.     <bookstore>
  3.         <book>
  4.             <title lang="en">IT book</title>
  5.             <author>Some IT Guy</author>
  6.         </book>
  7.     </bookstore>
  8.   </store>
  9.    
  10. root = et.parse('Template.xml').getroot()
  11. bookstore = root.find('bookstore')
  12. book = root.find('bookstore').find('book')
  13.    
  14. for bk in bks:
  15.     book.find('Title').text = bk
  16.     books.append(book)
  17.    
  18. book[0].append(book) and book[-1].append(book)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top