How to resolve the algorithm XML/Output step by step in the FreeBASIC programming language
How to resolve the algorithm XML/Output step by step in the FreeBASIC programming language
Table of Contents
Problem Statement
Create a function that takes a list of character names and a list of corresponding remarks and returns an XML document of
Let's start with the solution:
Step by Step solution about How to resolve the algorithm XML/Output step by step in the FreeBASIC programming language
Source code in the freebasic programming language
Data "April", "Bubbly: I'm > Tam and <= Emily", _
"Tam O'Shanter", "Burns: ""When chapman billies leave the street ...""", _
"Emily", "Short & shrift"
Declare Function xmlquote(ByRef s As String) As String
Dim n As Integer, dev As String, remark As String
Print ""
For n = 0 to 2
Read dev, remark
Print " "; _
xmlquote(remark); ""
Next
Print ""
End
Function xmlquote(ByRef s As String) As String
Dim n As Integer
Dim r As String
For n = 0 To Len(s)
Dim c As String
c = Mid(s,n,1)
Select Case As Const Asc(c)
Case Asc("<")
r = r + "<"
Case Asc(">")
r = r + ">"
Case Asc("&")
r = r + "&"
Case Asc("""")
r = r + """
Case Asc("'")
r = r + "'"
Case Else
r = r + c
End Select
Next
Function = r
End Function
You may also check:How to resolve the algorithm Introspection step by step in the OCaml programming language
You may also check:How to resolve the algorithm Multifactorial step by step in the VBScript programming language
You may also check:How to resolve the algorithm Hash from two arrays step by step in the Fantom programming language
You may also check:How to resolve the algorithm Character codes step by step in the Ecstasy programming language
You may also check:How to resolve the algorithm Set, the card game step by step in the EasyLang programming language