[Dive4elements-commits] [PATCH] Ignore comments in meta data xml template

Wald Commits scm-commit at wald.intevation.org
Thu Nov 1 15:16:04 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1351779361 -3600
# Node ID daf0919df76daf165b393f9264d4731e20561dd4
# Parent  823c8afa13356a4983cb9f2dbed8dfe389c44940
Ignore comments in meta data xml template

Comments should not be send to the client. Therefore ignore them when building
the nodes.

diff -r 823c8afa1335 -r daf0919df76d flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java	Thu Nov 01 14:49:43 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java	Thu Nov 01 15:16:01 2012 +0100
@@ -515,6 +515,11 @@
                 }
             }
 
+            if (current.getNodeType() == Node.COMMENT_NODE) {
+                // Ignore XML comments
+                return;
+            }
+
             Node copy = owner.importNode(current, false);
 
             NodeList children = current.getChildNodes();


More information about the Dive4elements-commits mailing list