Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ee234a

Browse files
author
A. Apesteguia
committed
Comments fix
1 parentc31d78e commit2ee234a

File tree

4 files changed

+19
-6
lines changed

4 files changed

+19
-6
lines changed

‎src/main/java/com/codepressed/CSVtoXML/Main.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,8 @@ public static void main(String[] args) {
4040
}
4141

4242
try {
43-
//ArrayList of ArrayStrings Generation with CSV
4443
ArrayList<String[]>elements;
4544
elements =newReader().CSVtoArrayList(csvFile,csvSplit);
46-
47-
//XML Doc Generation with ArrayList
4845
DocumentxmlDoc;
4946
xmlDoc =newXMLDoc().docBuilder(elements,elementName);
5047
XMLTransformer.transformDocToFile(xmlDoc,xmlFile);

‎src/main/java/com/codepressed/CSVtoXML/Reader.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
publicclassReader {
88

9-
//ArrayList Generation ArrayStrings with the CSV Data
9+
/**
10+
*
11+
* @param csvFile Input file
12+
* @param csvSplit Invalid chars filter
13+
* @return ArrayList of CSV Values
14+
* @throws IOException
15+
*/
1016
publicArrayList<String[]>CSVtoArrayList(StringcsvFile,StringcsvSplit)throwsIOException {
1117
ArrayList<String[]>elements =newArrayList<String[]>();
1218
BufferedReadercsvReader =null;

‎src/main/java/com/codepressed/CSVtoXML/XMLDoc.java‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212

1313
publicclassXMLDoc {
1414

15-
//DOC Generation -> XML with ArrayList String elements
15+
/**
16+
*
17+
* @param XMLelements ArrayList of CSV Values
18+
* @param elementName Name fixed for node tree
19+
* @return Final doc
20+
* @throws ParserConfigurationException
21+
*/
1622
publicDocumentdocBuilder(ArrayList<String[]>XMLelements,StringelementName)throwsParserConfigurationException {
1723
if (elementName ==null){
1824
elementName ="element";

‎src/main/java/com/codepressed/CSVtoXML/XMLTransformer.java‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
importjava.io.FileOutputStream;
1414

1515
publicclassXMLTransformer {
16-
//XML Generation -> Transform DOC Data to XML Format
16+
/** Transforms DOC Data to XML Format
17+
* @param xmlDoc
18+
* @param xmlFile
19+
* @throws TransformerException
20+
*/
1721
publicstaticvoidtransformDocToFile(DocumentxmlDoc,StringxmlFile)throwsTransformerException {
1822
TransformerFactoryxmlTransformerFactory =TransformerFactory.newInstance();
1923
TransformerxmlTransformer =xmlTransformerFactory.newTransformer();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp