summaryrefslogtreecommitdiff
path: root/xml2cmp
diff options
context:
space:
mode:
authorOliver-Rainer Wittmann <orw@apache.org>2012-06-27 19:14:51 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-06-27 19:14:51 +0100
commit240910f78575a5536748c2485cae13904fcef955 (patch)
tree76602430f284a0e0d5ff6aa66dbf5c55bee15317 /xml2cmp
parent8ed5bf0fcaa7f3682cec9728f5a5f448bc2507ec (diff)
adjust xml2cmp tool to handle XML comments
from: http://svn.apache.org/viewvc?view=revision&revision=1305252
Diffstat (limited to 'xml2cmp')
-rw-r--r--xml2cmp/source/xcd/parse.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/xml2cmp/source/xcd/parse.cxx b/xml2cmp/source/xcd/parse.cxx
index 72f565726a4c..fab09d926e36 100644
--- a/xml2cmp/source/xcd/parse.cxx
+++ b/xml2cmp/source/xcd/parse.cxx
@@ -82,6 +82,11 @@ X2CParser::Parse()
Parse_XmlDeclaration();
Parse_Doctype();
+ // skip XML comment
+ Goto('<');
+ if ( IsText("<!--") )
+ Goto_And_Pass('>');
+
pDocumentData->Parse(*this);
}