Skip to content

Instantly share code, notes, and snippets.

@markd2
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markd2/c6a18017233d01c7df3e to your computer and use it in GitHub Desktop.
Save markd2/c6a18017233d01c7df3e to your computer and use it in GitHub Desktop.
chapter_tree = ET.parse('Chapter.xml')
chapter_root = chapter_tree.getroot()
for para in chapter_root.iter('{http://docbook.org/ns/docbook}para'):
print para.text
<para>
In this chapter, you will focus on the authentication piece. You will
extend the Catalog app to provide a username and password when using
the JSON API. You will store the username into
<literal>NSUserDefaults</literal> and store the password securely in
the system keychain.
</para>
and get
In this chapter, you will focus on the authentication piece. You will
extend the Catalog app to provide a username and password when using
the JSON API. You will store the username into
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment