def _load(self, top=<NUM_LIT:5>, blue="<STR_LIT>", archive=None, member=None):
if archive is None:<EOL><INDENT>path = os.path.join(self.cache, self.name + "<STR_LIT>")<EOL>xml = open(path).read()<EOL><DEDENT>else:<EOL><INDENT>assert member is not None<EOL>xml = archive.read(member)<EOL><DEDENT>dom = parseString(xml).documentElement<EOL>attr = lambda e, a: e.attributes[a].value<EOL>for e in dom.getElementsByTagName("<STR_LIT>")[:top]:<EOL><INDENT>w = float(attr(e, "<STR_LIT>"))<EOL>try:<EOL><INDENT>rgb = e.getElementsByTagName("<STR_LIT>")[<NUM_LIT:0>]<EOL>clr = color(<EOL>float(attr(rgb, "<STR_LIT:r>")),<EOL>float(attr(rgb, "<STR_LIT:g>")),<EOL>float(attr(rgb, "<STR_LIT:b>")),<EOL>float(attr(rgb, "<STR_LIT:a>")),<EOL>mode="<STR_LIT>"<EOL>)<EOL>try:<EOL><INDENT>clr.name = attr(e, "<STR_LIT:name>")<EOL>if clr.name == "<STR_LIT>": clr = color(blue)<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>except:<EOL><INDENT>name = attr(e, "<STR_LIT:name>")<EOL>if name == "<STR_LIT>": name = blue<EOL>clr = color(name)<EOL><DEDENT>for s in e.getElementsByTagName("<STR_LIT>"):<EOL><INDENT>self.ranges.append((<EOL>clr,<EOL>shade(attr(s, "<STR_LIT:name>")),<EOL>w * float(attr(s, "<STR_LIT>"))<EOL>))<EOL><DEDENT><DEDENT>
Loads a theme from aggregated web data.

The data must be old-style Prism XML: <color>s consisting of <shade>s.
Colors named "blue" will be overridden with the blue parameter.

archive can be a file like object (e.g. a ZipFile)
and will be used along with 'member' if specified.