P
Per Magnus L?vold
Hi,
I'm working with a Java application that parses a semi-kolon (
separated file.
For the parsing I use StringTokenizer to cut each row into tokens. But
when a token has no content, the StringTokenizer ignores the token(!).
When I try to structure the parsed content, I now miss the "columns"
with no content, and the table I am trying to create becomes corrupt.
Example:
myFile:
***start***
a0;b0;c0;d0;e0;f0;
a1;b1;c1;;e1;f1;
a2;;c2;d2;e2;;
***end***
I'd rather want each of these rows to have 6 tokens (inkluding blank
tokens).
Row 1 has 6 tokens
Row 2 has 5 tokens (the third token is ignored)
Row 3 has 4 tokens (2nd and 6th are ignored)
When I try to make a table out of this, e1 appears in the "d" columnm,
f1 appears in the "e" column etc.
Can anybody help me solve this problem?
Regards, Per Magnus Løvold
I'm working with a Java application that parses a semi-kolon (
separated file.
For the parsing I use StringTokenizer to cut each row into tokens. But
when a token has no content, the StringTokenizer ignores the token(!).
When I try to structure the parsed content, I now miss the "columns"
with no content, and the table I am trying to create becomes corrupt.
Example:
myFile:
***start***
a0;b0;c0;d0;e0;f0;
a1;b1;c1;;e1;f1;
a2;;c2;d2;e2;;
***end***
I'd rather want each of these rows to have 6 tokens (inkluding blank
tokens).
Row 1 has 6 tokens
Row 2 has 5 tokens (the third token is ignored)
Row 3 has 4 tokens (2nd and 6th are ignored)
When I try to make a table out of this, e1 appears in the "d" columnm,
f1 appears in the "e" column etc.
Can anybody help me solve this problem?
Regards, Per Magnus Løvold