CSV格式[8],简单地说,是以逗号分隔的一组数值,本章将就提供一个完善的 CSV解析器展开讨论。
[I]498)this.width=498;' onmousewheel = 'javascript:return big(this)' border=0 alt="图4.1 Comma-Separated values(1)" src="http://pic.aIhUaU.com/201602/15/231418916.jpg" width=278 height=67>
This format is read and written by programs such as spreadsheets; not co- incidentally, it also appears on web pages for services such as stock price quota- tions. A popular web page for stock quotes presents a display like this:
[I]498)this.width=498;' onmousewheel = 'javascript:return big(this)' border=0 alt="图4.1 Comma-Separated values(2)" src="http://pic.aIhUaU.com/201602/15/231437421.jpg" width=392 height=109>
Retrieving numbers by interacting with a web browser is effective but time- consuming. It’s a nuisance to invoke a browser, wait, watch a barrage of adver- tisements, type a list of stocks, wait, wait, wait, then watch another barrage, all to get a few numbers. To process the numbers further requires even more interac- tion; selecting the “Download Spreadsheet Format” link retrieves a file that contains much the same information in lines of CSV data like these (edited to fit):
[I]498)this.width=498;' onmousewheel = 'javascript:return big(this)' border=0 alt="图4.1 Comma-Separated values(3) " src="http://pic.aIhUaU.com/201602/15/231449655.jpg" width=321 height=91>