~ubuntu-branches/debian/sid/bandit/sid

« back to all changes in this revision

Viewing changes to examples/xml_lxml.py

  • Committer: Package Import Robot
  • Author(s): Dave Walker (Daviey)
  • Date: 2015-07-22 09:01:39 UTC
  • Revision ID: package-import@ubuntu.com-20150722090139-fl0nluy0x8m9ctx4
Tags: upstream-0.12.0
ImportĀ upstreamĀ versionĀ 0.12.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import lxml.etree
 
2
import lxml
 
3
from lxml import etree
 
4
from defusedxml.lxml import fromstring
 
5
from defuxedxml import lxml as potatoe
 
6
 
 
7
xmlString = "<note>\n<to>Tove</to>\n<from>Jani</from>\n<heading>Reminder</heading>\n<body>Don't forget me this weekend!</body>\n</note>"
 
8
root = lxml.etree.fromstring(xmlString)
 
9
root = fromstring(xmlString)