You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2013/03/26 23:12:58 UTC
svn commit: r1461338 - /commons/proper/csv/trunk/src/site/xdoc/index.xml
Author: ggregory
Date: Tue Mar 26 22:12:57 2013
New Revision: 1461338
URL: http://svn.apache.org/r1461338
Log:
Add a 'using' section to the main page with a short code example and pointers to the Javadoc. Move the "About" section to the end and remove broken package reference.
Modified:
commons/proper/csv/trunk/src/site/xdoc/index.xml
Modified: commons/proper/csv/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/site/xdoc/index.xml?rev=1461338&r1=1461337&r2=1461338&view=diff
==============================================================================
--- commons/proper/csv/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/csv/trunk/src/site/xdoc/index.xml Tue Mar 26 22:12:57 2013
@@ -22,18 +22,16 @@ limitations under the License.
</properties>
<body>
<!-- ================================================== -->
-<section name="Commons CSV">
- <p>Commons CSV was started to unify a common and simple interface for reading and writing CSV files under an ASL license. It has been bootstrapped by a code donation from Netcetera in Switzerland. There are three pre-existing BSD compatible CSV parsers which this component will hopefully make redundant (authors willing): </p>
- <ul>
- <li><a href="http://kasparov.skife.org/csv/">Skife CSV</a></li>
- <li><a href="http://opencsv.sourceforge.net/">Open CSV</a></li>
- <li><a href="http://www.osjava.org/genjava/multiproject/gj-csv/">Genjava CSV</a></li>
- </ul>
- <p>In addition to the code from Netcetera (org.apache.commons.csv), Martin van den Bemt has added an additional writer API (org.apache.commons.csv.writer). </p>
- <p>Other CSV implementations: </p>
- <ul>
- <li><a href="http://supercsv.sourceforge.net/">Super CSV</a></li>
- </ul>
+<section name="Using Commons CSV">
+ <p>Commons CSV reads and writes files in variations of the Comma Separated Value (CSV) format.</p>
+ <p>To parse an Excel CSV file, write:</p>
+ <source>Reader in = ...;
+Iterable<CSVRecord> parser = CSVFormat.EXCEL.parse(in);
+for (CSVRecord record : parser) {
+ ...
+}</source>
+ <p>Other formats are available, please consult the Javadoc for <a href="apidocs/org/apache/commons/csv/CSVFormat.html">CSVFormat</a> and
+ <a href="apidocs/org/apache/commons/csv/CSVParser.html">CSVParser</a></p>
</section>
<section name="Getting the code">
@@ -46,6 +44,20 @@ limitations under the License.
<p>Please report any bugs or issues in the Commons Sandbox Jira project at <a href="http://issues.apache.org/jira/browse/CSV">http://issues.apache.org/jira/browse/CSV</a>. Please ask any questions or suggest any ideas for improvement on the commons-dev and commons-user <a href="mail-lists.html">mailing lists</a>. </p>
</section>
+<section name="About Commons CSV">
+ <p>Commons CSV was started to unify a common and simple interface for reading and writing CSV files under an ASL license. It has been bootstrapped by a code donation from Netcetera in Switzerland. There are three pre-existing BSD compatible CSV parsers which this component will hopefully make redundant (authors willing): </p>
+ <ul>
+ <li><a href="http://kasparov.skife.org/csv/">Skife CSV</a></li>
+ <li><a href="http://opencsv.sourceforge.net/">Open CSV</a></li>
+ <li><a href="http://www.osjava.org/genjava/multiproject/gj-csv/">Genjava CSV</a></li>
+ </ul>
+ <p>In addition to the code from Netcetera (org.apache.commons.csv), Martin van den Bemt has added an additional writer API. </p>
+ <p>Other CSV implementations: </p>
+ <ul>
+ <li><a href="http://supercsv.sourceforge.net/">Super CSV</a></li>
+ </ul>
+</section>
+
<!-- ================================================== -->
</body>
</document>