templates.SerializerEscapeXML.vm Maven / Gradle / Ivy
private fun escapeXml(ostream : java.io.PrintStream, chain : String) {
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