code: def pipe_fetchdata(context=None, _INPUT=None, conf=None, **kwargs):
      
      # todo: iCal and KML
      funcs = get_splits(None, conf, **cdicts(opts, kwargs))
      parsed = get_parsed(_INPUT, funcs[0])
      results = starmap(parse_result, parsed)
      items = imap(utils.gen_items, results)
      _OUTPUT = utils.multiplex(items)
      return _OUTPUT
docs: A source that fetches and parses an XML or JSON file. Loopable.
  
      Parameters
      ----------
      context : pipe2py.Context object
      _INPUT : pipeforever pipe or an iterable of items or fields
      conf : {
          'URL': {'value': <url>},
          'path': {'value': <dot separated path to data list>}
      }
  
      Yields
      ------
      _OUTPUT : items
  
      Examples
      --------
      >>> from os import path as p
      >>> from pipe2py.modules.pipeforever import pipe_forever
      >>> parent = p.dirname(p.dirname(__file__))
      >>> abspath = p.abspath(p.join(parent, 'data', 'gigs.json'))
      >>> path = 'value.items'
      >>> url = "file://%s" % abspath
      >>> conf = {'URL': {'value': url}, 'path': {'value': path}}
      >>> pipe_fetchdata(_INPUT=pipe_forever(), conf=conf).next().keys()[:5]
      [u'y:repeatcount', u'description', u'pubDate', u'title', u'y:published']
      >>> abspath = p.abspath(p.join(parent, 'data', 'places.xml'))
      >>> path = 'appointment'
      >>> url = "file://%s" % abspath
      >>> conf = {'URL': {'value': url}, 'path': {'value': path}}
      >>> sorted(pipe_fetchdata(_INPUT=pipe_forever(), conf=conf).next().keys())
      ['alarmTime', 'begin', 'duration', 'places', 'subject', 'uid']
      >>> conf = {'URL': {'value': url}, 'path': {'value': ''}}
      >>> sorted(pipe_fetchdata(_INPUT=pipe_forever(), conf=conf).next().keys())
      ['appointment', 'reminder']