''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This function assumes url that will return
' xml as a response and return this string
' clear from bom in begining (if BOM is present).
' @author Georgi Naumov
' gonaumov@gmail.com for contacts and suggestions.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function getXmlResponseClearFromBom(strUrl)
Dim httpRequest, regEx
Set regEx = New RegExp
regEx.Pattern = "^[^<]+"
regEx.IgnoreCase = True
regEx.Global = True
Set httpRequest = CreateObject("WinHttp.WinHttpRequest.5.1")
httpRequest.Open "GET", strUrl, true
httpRequest.Send()
httpRequest.WaitForResponse()
getXmlResponseClearFromBom = regEx.Replace(httpRequest.ResponseText,"")
End Function