<!-- Begin

'----------------------------------------
'    Send XML to appropriate listener
'----------------------------------------
function SendXML(pXML, pListenerURL)
  dim vSendXML
   
  set xmlhttp=createobject("Microsoft.XMLHTTP")
  set xmldom=createobject("Microsoft.XMLDOM")
  xmlhttp.Open "POST", pListenerURL, False
  xmlDOM.validateOnParse = True
  xmlDOM.async = False
  xmlDOM.loadXML pXML
  'msgBox "XML: " & pXML
  if xmlDOM.parseError <> 0 Then
    Set objXMLParseError = xmlDOM.parseError
    with objXMLParseError
      msgBox "XML Error at line" & .Line & " " & .srcText & ". " & .reason & vbcrlf & "XML:" & pXML
    end with
    vSendXML = "Error: XML parse failure"
  else
    xmlhttp.send xmlDOM
    vSendXML = xmlhttp.responsetext
    
    'if left(xmlhttp.responsetext,7)="Success" Then
    '  vSendXML = true
    'else
    '  msgbox xmlhttp.responsetext,48,"Error"
    'end if
  end if
  set xmlDOM=nothing
  set xmlhttp=nothing
  
  SendXML = vSendXML
end function

//  End -->
