samarsault / CSV-Mapper

A CSV Parser using a pre-defined mapper file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Accept both text and file as possible argument

samarsault opened this issue · comments

Example -

# xml text or file
mapper = csvmapper.XMLMapper('mapper.xml')
# csv data or file
parser = csvmapper.CSVParser('data.csv', mapper)

And this should be possible -

mapper = CSVMapper.XMLMapper('<?xml version="1.0....')
# this too
parser = csvmapper.CSVParser('John,Doe, 13\nPaul,Nd, 20...')