Thursday, October 19, 2017
 

Examples

Here some XML examples for some script languages like PHP, Python, ASP, VBscript-Class, Java, C#, Jabber, ...

PHP | Python | ASP/VB-Script | VBscript Class | C# | Java | Jabber

XML with ASP/VBScript

This script is based on Microsoft Windows 2000 Server, Microsoft Internet Information Server 5.0 (IIS), Microsoft XML 3.0/Service Pack 1 (MSXML) and ASPSMS Active X Component Version 3.0. Make sure that you modify the path for your XML document.

If you want to have more comfort, please have also a look at the following example scripts: VBscript Class

<%
Option Explicit
'-----------------------------------------------------------------------
' Define Variables
'-----------------------------------------------------------------------
Dim xmlExample, XMLhttp, xmlDoc2, Response_Doc
'-----------------------------------------------------------------------
' HTML
'-----------------------------------------------------------------------
%>
<html>
<head>
<title>XML Post</title>
</head>
<body>
<pre>
<%
'-----------------------------------------------------------------------
' Open XML document
'-----------------------------------------------------------------------
Set xmlExample = CreateObject("MSXML2.DOMDocument")
xmlExample.SetProperty "ServerHTTPRequest", False
xmlExample.Async = False
xmlExample.Load "E:\aspsms\xml\request1.xml"
'-----------------------------------------------------------------------
' Check XML document
'-----------------------------------------------------------------------
If Not xmlExample.ParseError = 0 Then
  Response.Write "<b>Error Code:</b> " & xmlExample.ParseError & "<br>"
  Response.Write "<b>Error Description:</b> " & xmlExample.ParseError.reason & "<br>"
  Response.Write "<b>Error File Position:</b> " & xmlExample.ParseError.filepos & "<br>"
  Response.Write "<b>Error Line:</b> " & xmlExample.ParseError.line & "<br>"
  Response.Write "<b>Error Line Position:</b> " & xmlExample.ParseError.linepos & "<br>"
  Response.Write "<b>Error Source Text:</b> " & xmlExample.ParseError.srcText & "<br>"
Else
  '-----------------------------------------------------------------------
  ' Send XML request
  '-----------------------------------------------------------------------
  Set XMLhttp = CreateObject("MSXML2.ServerXMLHTTP")
  XMLhttp.Open "POST", "http://xml1.aspsms.com:5061/xmlsvr.asp", False
  XMLhttp.Send xmlExample.xml
  '-----------------------------------------------------------------------
  ' Get server status
  '-----------------------------------------------------------------------
  Response.Write "<br>"
  Response.Write "<b>xmlSvr Server Status:</b><br>"
  Response.Write "-----------------------------------------<br>"
  Response.Write "<b>Status (Value must be 200): </b>" & XMLhttp.status & "<br>"
  Response.Write "<b>ReadyState (Value must be 4): </b>" & XMLhttp.ReadyState & "<br>"
  Response.Write "<b>StatusText (Value must be OK): </b>" & XMLhttp.StatusText & "<br>"
  Response.Write "<b>AllResponseHeaders:</b><br>" & XMLhttp.GetAllResponseHeaders & "<br>"
  '-----------------------------------------------------------------------
  ' Get XML response from xmlSvr
  '-----------------------------------------------------------------------
  Set xmlDoc2 = CreateObject("MSXML2.DOMDocument")
  xmlDoc2.setProperty "ServerHTTPRequest", True
  xmlDoc2.async = False
  xmlDoc2.LoadXML XMLhttp.ResponseXML.xml
  Response.Write "<br>"
  Response.Write "<b>xmlSvr XML Response:</b><br>"
  Response.Write "-----------------------------------------<br>"
  Response_Doc = xmlhttp.responseXML.xml
  Response_Doc = Replace (Response_Doc,"<","&lt;")
  Response_Doc = Replace (Response_Doc,">","&gt;")
  Response.Write Response_Doc & "<br>"
End If
%>
</pre>
</body>
</html>

More XML examples:

PHP | Python | ASP/VB-Script | VBscript Class | C# | Java | Jabber

New User Registration

Click here for the ASPSMS new user registration.

Have you already registered? Log in with your user e-mail address and password.


Forgot Login Password?

Available SMS tools and interfaces for ASPSMS

Factsheets
Purpose and business examplesPDF
SMS tools for End Users
NamePricing
NEW: ASPSMS WinLog free
Microsoft Office Outlook 2013-2016: Email to SMSfree
Microsoft Office Outlook 2010 Mobile Servicefree
Microsoft Office Outlook 2007 Mobile Servicefree
SMSBLASTER web editionfree
SMS Blaster Windows Editionfree
SMS touch for iPhone and iPod touchShareware
ECO-SMS - Ökologische SMS!Shareware
Cybersystems mscrmSMSsee price list for details
Jabber-Client Chatopus for Palm OSsmall one-time payment
delight Software GmbHsee price list for details
ASPSMS Widget for Macfree
SMS scripts and interfaces for developers
NamePricing
ASPSMS Dot Net Assembly on NuGet free
ASPSMS JSON API (REST) free
C# Microsoft ASP.NET Identity MVC (for SOAP)free
Node.js interface for ASPSMSfree
PHP Class for ASPSMS SOAP web servicefree
aspsms.dll (Active-X)free
SOAP Web Servicefree
XML-Interfacefree
ASPSMS SMTP Interfacefree
VBscript Class (ASP)free
HTTPfree
PHP - Python - C# - Javafree
Jabber to SMS for Server Adminsfree (open source)
SMS Blaster Visual Basic Source Codefree
ASPTOKENfree
Network coverage
Supported networks around the world
VADIAN.NET AG
Katharinengasse 10
CH - 9004 St.Gallen
 
Phone: +41 71 246 56 56
Fax: +41 71 246 56 57
E-Mail: keyaccounts@aspsms.com
 
Founded: 1995
Company Number: CH-170.3.020.905-6
VAT-Number: CHE-102.692.722 MWST

Mastercard - Mastercard Securecode Mastercard - Mastercard Securecode Visa Visa - Verified by Visa Diners Club American Express PayPal Postcard Bank Transfer

Swiss Quality

OFCOM registered Telecommunications Service Provider (254900005).

ASPSMS is a product of VADIAN.NET AG (founded in 1995), a Swiss based Internet and Mobile Solutions pioneer. Thus, all data collected from you are automatically subject ofthe strict privacy policies of Switzerland. ASPSMS is Swiss technology that is fully developed in Switzerland. The support team also works in Switzerland. VADIAN.NET AG is today one of the leading global providers of SMS solutions with more than 200000 satisfied business clients. The product ASPSMS was launched in 2001.