Skip to content

Commit

Permalink
Fixed line length
Browse files Browse the repository at this point in the history
  • Loading branch information
stchris committed Jan 12, 2016
1 parent 9ef59e2 commit 5902bcc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ def access():
"""
Shows basic attribute access and node navigation.
"""
o = untangle.parse('<node id="5">This is cdata<subnode value="abc"/></node>')
o = untangle.parse(
'<node id="5">This is cdata<subnode value="abc"/></node>'
)
return ("Node id = %s, subnode value = %s" %
(o.node['id'], o.node.subnode['value']))

Expand All @@ -29,11 +31,14 @@ def siblings_list():
''')
return ','.join([child['name'] for child in o.root.child])


def access_cdata():
"""
Shows how to handle CDATA elements
"""
o = untangle.parse('<node id="5">This is cdata<subnode value="abc"/></node>')
o = untangle.parse(
'<node id="5">This is cdata<subnode value="abc"/></node>'
)
return ("%s" % (o.node.cdata))

examples = [
Expand Down

0 comments on commit 5902bcc

Please sign in to comment.