Mercurial > hg > Members > tatsuki > JungleXMLReader
comparison src/main/java/ac/jp/u_ryukyu/cr/ie/tatsuki/xmlReader/ReadXmlPutAttributeCreateIndex.java @ 40:59a7d2cffc86
add timeMeasurementJuGrix
author | one |
---|---|
date | Thu, 13 Nov 2014 23:34:41 +0900 |
parents | 7f70341a78bc |
children |
comparison
equal
deleted
inserted
replaced
39:22edfb7f47ad | 40:59a7d2cffc86 |
---|---|
71 path = path.add(-1); | 71 path = path.add(-1); |
72 } | 72 } |
73 | 73 |
74 @Override | 74 @Override |
75 public void characters(char[] ch, int start, int length) { | 75 public void characters(char[] ch, int start, int length) { |
76 String str = new String(ch, start, length); | 76 String str = new String(ch, start, length); |
77 Pattern pattern = Pattern.compile("\n"); | 77 Pattern pattern = Pattern.compile("\n"); |
78 Matcher macher = pattern.matcher(str); | 78 Matcher macher = pattern.matcher(str); |
79 | 79 |
80 if (!macher.find()) { | 80 if (!macher.find()) { |
81 if (str.equals("r:63 r:3 r:9")) | 81 String[] splitStrs = str.split(" "); |
82 System.out.println("aaa"); | 82 for (String splitStr : splitStrs) { |
83 String[] splitStrs = str.split(" "); | |
84 for (String splitStr : splitStrs) { | |
85 Pair<Integer, NodePath> nodePair = path.last(); | 83 Pair<Integer, NodePath> nodePair = path.last(); |
86 NodePath onePath = nodePair.right(); | 84 NodePath onePath = nodePair.right(); |
87 Either<Error, JungleTreeEditor> newEither = editor.putAttribute(onePath, "text-" + elementName, ByteBuffer.wrap(splitStr.getBytes())); | 85 Either<Error, JungleTreeEditor> newEither = editor.putAttribute(onePath, "text-" + elementName, |
86 ByteBuffer.wrap(splitStr.getBytes())); | |
88 if (newEither.isA()) { | 87 if (newEither.isA()) { |
89 //error | 88 // error |
90 } | 89 } |
91 this.editor = newEither.b(); | 90 this.editor = newEither.b(); |
92 } | 91 } |
93 } | 92 } |
94 } | 93 } |
95 | 94 |
96 @Override | 95 @Override |
97 public void endElement(String namespaceURI, String localName, String qName) { | 96 public void endElement(String namespaceURI, String localName, String qName) { |