Firstly - just because CSV stands for 'comma separated values' doesn't mean the values are *actually* separated by commas. There's all sorts of delimiters - common alternatives include full stops, tabs, carriage returns and semicolons.
If you want to handle CSV files, there should already be a library around to do it. As for fileStream.split(","), I don't know enough about Java to tell you if this is the best method (in both senses) available.
Secondly, for XML, I'd probably likewise find a library. Failing that, it depends how I'd expect to seek data in the file. You could probably model an XML file like a list of lists of dictionaries (key / value pairs). But seeking the resultant data might not be tremendously efficient.
Thirdly, IIRC, the syntax of the for-each loop in Java is
for (String x: myList) {
someObject.someMethod(x);
}