Skip to content

Commit 9462669

Browse files
author
Mario De Benito Aspas
committed
-Modified the parser to standarize the way it interacts with XML tags.
-Added a Main class to show how the parser works.
1 parent 42a98a4 commit 9462669

File tree

2 files changed

+244
-244
lines changed

2 files changed

+244
-244
lines changed

src/main/java/es/mdbdev/Main.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package es.mdbdev;
2+
3+
import es.mdbdev.cvrfparser.model.cvrf.Cvrfdoc;
4+
import es.mdbdev.cvrfparser.xml.CvrfParser;
5+
import org.xml.sax.SAXException;
6+
7+
import javax.xml.parsers.ParserConfigurationException;
8+
import java.io.IOException;
9+
10+
/**
11+
* Created by tf05046 on 07/02/2017.
12+
*/
13+
public class Main {
14+
public static void main(String [] args){
15+
CvrfParser parser = new CvrfParser("data/MS16-120.xml");
16+
try {
17+
Cvrfdoc result = parser.parseCvrfFile();
18+
System.out.println(result);
19+
} catch (ParserConfigurationException e) {
20+
e.printStackTrace();
21+
} catch (SAXException e) {
22+
e.printStackTrace();
23+
} catch (IOException e) {
24+
e.printStackTrace();
25+
}
26+
}
27+
}

0 commit comments

Comments
 (0)