1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
XMLReader r = new XMLReader();
r.addHandler("row", new NodeHandler() {
@Override
public void process(StructuredNode node) {
try {
count = count+1;
String[] dataChild = new String[collength];
for(int k=1; k < collength +1; k++) {
if(!node.isEmpty("c" + k)){
dataChild[k-1] = node.queryString("c"+ k);
}else{
dataChild[k-1] = getNodeValue(node, k, path, xs.getLobList());
}
}
} catch(Exception e){
e.printStackTrace();
}
}
});
r.parse(new FileInputStream(xmlfilepath));
|
참고
http://andreas.haufler.info/2012/01/conveniently-processing-large-xml-files.html
Conveniently Processing Large XML Files with Java
When processing XML data I find it most convenient to load the whole document using a DOM parser and fire some XPath-queries against the re...
andreas.haufler.info
GitHub
https://github.com/andyHa/scireumOpen/tree/master/src/com/scireum/open
andyHa/scireumOpen
DEPRECATED: See scireum/sirius. Contribute to andyHa/scireumOpen development by creating an account on GitHub.
github.com
XSD 스키마 분석 참고
'JAVA' 카테고리의 다른 글
[java] 리눅스 서버 접속하여 명령어 실행 (0) | 2020.03.27 |
---|---|
[java] IE 뒤로가기 실행 시 웹페이지 만료 방지 (0) | 2020.03.27 |