Created
March 30, 2013 17:14
-
-
Save fuzeman/5277507 to your computer and use it in GitHub Desktop.
Element Tree - One-line element creation with text attribute.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_element(name, text): | |
elem = et.Element(name) | |
elem.text = text | |
return elem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment