All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.SerializerEscapeXML.vm Maven / Gradle / Ivy



private fun escapeXml(ostream : java.io.PrintStream, chain : String?) {
    if(chain == null){return}
    var i = 0
   var max = chain.length
   while(i < max){
        var c = chain.charAt(i)
        if(c == '"') {
            ostream.print(""")
        } else if(c == '&') {
            ostream.print("&")
        } else if(c == '\'') {
            ostream.print("'")
        } else if(c == '<') {
            ostream.print("<")
        } else if(c == '>') {
            ostream.print(">")
        } else {
            ostream.print(c)
        }
        i = i + 1
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy