comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java @ 4353:daf0919df76d

Ignore comments in meta data xml template Comments should not be send to the client. Therefore ignore them when building the nodes.
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 01 Nov 2012 15:16:01 +0100
parents 58bdf95df5e4
children 1f38fa929986
comparison
equal deleted inserted replaced
4352:823c8afa1335 4353:daf0919df76d
513 if (txt != null && txt.trim().length() == 0) { 513 if (txt != null && txt.trim().length() == 0) {
514 return; 514 return;
515 } 515 }
516 } 516 }
517 517
518 if (current.getNodeType() == Node.COMMENT_NODE) {
519 // Ignore XML comments
520 return;
521 }
522
518 Node copy = owner.importNode(current, false); 523 Node copy = owner.importNode(current, false);
519 524
520 NodeList children = current.getChildNodes(); 525 NodeList children = current.getChildNodes();
521 for (int i = 0, N = children.getLength(); i < N; ++i) { 526 for (int i = 0, N = children.getLength(); i < N; ++i) {
522 build(copy, children.item(i)); 527 build(copy, children.item(i));

http://dive4elements.wald.intevation.org