Revision 51936
Added by Claudio Atzori almost 6 years ago
modules/dnet-openaireplus-mapping-utils/trunk/src/main/java/eu/dnetlib/data/transform/xml/VtdUtilityParser.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import java.util.*; |
4 | 4 |
|
5 |
import com.google.common.collect.Lists; |
|
6 | 5 |
import com.google.common.collect.Maps; |
7 | 6 |
import com.ximpleware.*; |
8 | 7 |
|
... | ... | |
51 | 50 |
final AutoPilot apAttr = new AutoPilot(vn); |
52 | 51 |
apAttr.selectAttr("*"); |
53 | 52 |
Map<String, String> attributes = new HashMap<>(); |
54 |
int i=-1;
|
|
55 |
while((i=apAttr.iterateAttr())!=-1){
|
|
56 |
attributes.put(vn.toNormalizedString(i),vn.toNormalizedString(i+1) );
|
|
53 |
int i; |
|
54 |
while((i = apAttr.iterateAttr()) != -1){
|
|
55 |
attributes.put(vn.toNormalizedString(i),vn.toNormalizedString(i + 1) );
|
|
57 | 56 |
} |
58 | 57 |
currentNode.setAttributes(attributes); |
59 | 58 |
results.add(currentNode); |
Also available in: Unified diff
more VTD utilities