Lines Matching refs:parse
53 from urllib.parse import urljoin
79 # @param parse Parse mode. Either "xml" or "text".
81 # @return The expanded resource. If the parse mode is "xml", this
82 # is an ElementTree instance. If the parse mode is "text", this
87 def default_loader(href, parse, encoding=None):
88 if parse == "xml":
90 data = ElementTree.parse(file).getroot()
141 parse = e.get("parse", "xml")
142 if parse == "xml":
149 node = loader(href, parse)
152 "cannot load %r as %r" % (href, parse)
160 elif parse == "text":
161 text = loader(href, parse, e.get("encoding"))
164 "cannot load %r as %r" % (href, parse)
177 "unknown parse type in xi:include tag (%r)" % parse