@staticmethod<EOL><INDENT>def parse(server, data, initpath):  <DEDENT>
STREAMCLS = {<NUM_LIT:1>: VideoStream, <NUM_LIT:2>: AudioStream, <NUM_LIT:3>: SubtitleStream}<EOL>stype = cast(int, data.attrib.get('<STR_LIT>'))<EOL>cls = STREAMCLS.get(stype, MediaPartStream)<EOL>return cls(server, data, initpath)<EOL>
Factory method returns a new MediaPartStream from xml data.