Mercurial > hg > Members > tatsuki > JungleXMLReader
changeset 27:095813055f19
minner change
author | one |
---|---|
date | Wed, 29 Oct 2014 15:48:19 +0900 |
parents | ef3fae2e7f0c |
children | ed831b2fc156 |
files | src/main/java/ac/jp/u_ryukyu/cr/ie/tatsuki/xmlReader/ReadXmlPutAttributeCreateIndex.java |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/ac/jp/u_ryukyu/cr/ie/tatsuki/xmlReader/ReadXmlPutAttributeCreateIndex.java Tue Oct 28 06:34:47 2014 +0900 +++ b/src/main/java/ac/jp/u_ryukyu/cr/ie/tatsuki/xmlReader/ReadXmlPutAttributeCreateIndex.java Wed Oct 29 15:48:19 2014 +0900 @@ -21,6 +21,7 @@ private JungleTree tree; private JungleTreeEditor editor; private NodePath path; + private String elementName; public ReadXmlPutAttributeCreateIndex(JungleTree tree){ this.tree = tree; @@ -47,6 +48,7 @@ if (qName != "") { // System.out.println("qName= " + qName); + elementName = qName; Either<Error, JungleTreeEditor> newEither = editor.putAttribute(path, "element", ByteBuffer.wrap(qName.getBytes())); if (newEither.isA()) { //error @@ -79,8 +81,8 @@ if (!macher.find()) { Pair<Integer, NodePath> nodePair = path.last(); NodePath onePath = nodePair.right(); - //System.out.println(str); - Either<Error, JungleTreeEditor> newEither = editor.putAttribute(onePath, "text", ByteBuffer.wrap(str.getBytes())); + System.out.println(str); + Either<Error, JungleTreeEditor> newEither = editor.putAttribute(onePath, "text-" + elementName, ByteBuffer.wrap(str.getBytes())); if (newEither.isA()) { //error }