- regex.pattern xml?
, replace shell, .
< > .
' ..
" " Friend ReplaceSpecChars (ByVal str As String) Dim arrLessThan Dim arrGreaterThan Not IsDBNull (str)
str = CStr(str)
If Len(str) > 0 Then
str = Replace(str, "&", "&")
str = Replace(str, "'", "'")
str = Replace(str, """", """)
arrLessThan = FindLocationOfChar("<", str)
arrGreaterThan = FindLocationOfChar(">", str)
str = ChangeGreaterLess(arrLessThan, arrGreaterThan, str)
str = Replace(str, Chr(13), "chr(13)")
str = Replace(str, Chr(10), "chr(10)")
End If
Return str
Else
Return ""
End If
Friend ChangeGreaterLess (ByVal lh As Collection, ByVal gr As Collection, ByVal str As String) As String As Integer = 0 lh.Count CInt (lh.Item(i)) > CInt (gr.Item(i)) str = (str, "<", "<" )///////////// End If
Next
str = Replace(str, ">", ">")
Friend FindLocationOfChar (ByVal chr As Char, ByVal str As String) Dim arr As Integer = 1 str.Length() - 1 str.ToCharArray(i, 1) = chr arr.Add() arr
xml , .
here4u