Skip to content

HttpGetXmlNode - cXmlHttpTransfer

Requests XML data

Type: Function
Return Data Type: Handle

Parameters

Parameter Type Description
sHost String The URL host (e.g. DataAccess.com - Note: DO NOT include the "HTTP://")
sFilePath String The file path and any data passed in a query string (e.g. MyXMlSite/XmlSrvc.asp?ID=A)

Syntax

Function HttpGetXmlNode String sHost String sFilePath Returns Handle

Call Example

Get HttpGetXmlNode sHost sFilePath to HandleVariable

Description

The HttpGetXmlNodefunction requests XML data.

This along with HttpPostXmlNode, will be the two most commonly used methods in this class.

Received data is translated as needed based on the property values of peTranslateReceived.

Sample

handle hoHttp
handle hoXml

Get Create U_cXmlHttpTransfer to hoHttp

Get HttpGetXmlNode of hoHttp "dataaccess.com" ;
    "MyApplication/pricelist.xml" to hoXml

Send Destroy of hoHttp

If (hoXml=0) ;
    Send Stop_Box "No document returned" "Error"
Else Begin
    Send Info_Box (psXml(hoXml))
    Send DoWhateverYouWantWithXmlDocument hoXml
    Send Destroy of hoXml
End

See Also

Info_Box

Return Value

The data received is returned as a new XML object. If an error occurs in the transfer or if the resulting data is not properly formed XML, a zero is returned.