common_helper/src/main/java/com/xiongyingqi/util/xml/XmlValidationModeDetector.java
private String consumeCommentTokens(String line) {
        if (line.indexOf(START_COMMENT) == -1 && line.indexOf(END_COMMENT) == -1) {
            return line;
        }
        while ((line = consume(line)) != null) {
            if (!this.inComment && !line.trim().startsWith(START_COMMENT)) {
                return line;
            }
        }
        return line;
    }
private String consumeCommentTokens(String line) {
        if (line.indexOf(START_COMMENT) == -1 && line.indexOf(END_COMMENT) == -1) {
            return line;
        }
        while ((line = consume(line)) != null) {
            if (!this.inComment && !line.trim().startsWith(START_COMMENT)) {
                return line;
            }
        }
        return line;
    }
Consumes all the leading comment data in the given String and returns the remaining content, which
may be empty since the supplied content might be all comment data. For our purposes it is only important
to strip leading comment content on a line since the first piece of non comment content will be either
the DOCTYPE declaration or the root element of the document.