Skip to content

Commit 5879333

Browse files
committed
Minor documentation improvement
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@383467 13f79535-47bb-0310-9956-ffa450edef68
1 parent 98c77bd commit 5879333

1 file changed

Lines changed: 24 additions & 18 deletions

File tree

src/java/org/apache/commons/csv/package.html

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<title>org.apache.commons.csv package</title>
2020
</head>
2121
<body>
22-
<h3>WAKE CSV Format Support</h3>
22+
<h3>Jakarta-Commons CSV Format Support</h3>
2323

2424
<p>CSV (or its dialects) are widely used as interfaces to legacy systems or
2525
manual data-imports. Basically CSV stands for "Comma Separated Values" but
26-
this simple leads to more confusion than definitions.</p>
26+
this simple abbreviation leads to more confusion than definitions.</p>
2727

2828
<p>Common to all file dialects is its basic structure: The CSV data-format
2929
is record oriented, whereas each record starts on a new textual line. A
@@ -36,29 +36,35 @@ <h3>WAKE CSV Format Support</h3>
3636

3737
<p>The following list contains the csv aspects the WAKE CSV parser supports:</p>
3838
<dl>
39-
<dt>Separators</dt>
40-
<dd>The record separators are hardcoded and cannot be changed. The must be '\n' or '\r\n'.
41-
The separator (or delimiters) for values is freely configurable (default ',').</dd>
39+
<dt>Separators (for lines)</dt>
40+
<dd>The record separators are hardcoded and cannot be changed. The must be '\n' or '\r\n'.</dd>
4241

43-
<dt>Comments</dt>
44-
<dd>Some CSV-dialects support a simple comment syntax. A comment is a record
45-
which must start with a designated character (the commentStarter). A record
46-
of this kind is treated as comment and gets removed from the input (default '(char)0')</dd>
42+
<dt>Delimiter (for values)</dt>
43+
<dd>The delimiter for values is freely configurable (default ',').</dd>
44+
45+
<dt>Comments</dt>
46+
<dd>Some CSV-dialects support a simple comment syntax. A comment is a record
47+
which must start with a designated character (the commentStarter). A record
48+
of this kind is treated as comment and gets removed from the input (default '(char)0')</dd>
4749

48-
<dt>Simple values</dt>
49-
<dd>A simple value consist of all characters (except the separator) until
50-
(but not including) the next separator or a record-terminator. Optionally
51-
all leading whitespaces of a simple value can be ignored (default: true).</dd>
50+
<dt>Encapsulator</dt>
51+
<dd>Two encapsulator characters (default '"') are used to enclose -&gt; complex values.</dd>
52+
53+
<dt>Simple values</dt>
54+
<dd>A simple value consist of all characters (except the separator) until
55+
(but not including) the next separator or a record-terminator. Optionally
56+
all leading whitespaces of a simple value can be ignored (default: true).</dd>
5257

5358
<dt>Complex values</dt>
54-
<dd>Complex values are encapsulated within the defined encapsulator character (default '"').
59+
<dd>Complex values are encapsulated within the defined encapsulator character.
5560
The encapsulator itself must be escaped by '\' or doubled when used inside complex values.
56-
Complex values preserve all kind of formatting (including newlines -> multiline-values)</dd>
57-
61+
Complex values preserve all kind of formatting (including newlines -&gt; multiline-values)</dd>
62+
5863
<dt>Unicode escapes</dt>
5964
<dd>Some non-unicode CSVs use unicode escaping sequences for certain unicode characters. The standard
6065
unicode-escaping is '\uXXXX' whereas XXXX is the unicode-character-code in hex-format. The parser
6166
can optionally resolve unicode escapes (default: disabled).</dd>
67+
6268
<dt>Empty line skipping</dt>
6369
<dd>Optionally empty lines in CSV files might be skiped. Not skiping empty lines will return
6470
an empty record on '\nEOF' combinations.</dd>
@@ -68,11 +74,11 @@ <h3>WAKE CSV Format Support</h3>
6874
can be set directly.</p>
6975

7076
<p>Example usage:</p>
71-
<pre><blockquote>
77+
<blockquote><pre>
7278
String[] parsedLine = CSVParser.parseLine("a,b,c");
7379
for (int i = 0; i &lt; parsedLine.length; ++i) {
7480
System.out.println("value " + i + "=" + parsedLine[i]);
7581
}
76-
</blockquote></pre>
82+
</pre></blockquote>
7783
</body>
7884
</html>

0 commit comments

Comments
 (0)