Skip to content

peTranslateSent - cXmlHttpTransfer

Determines character translation for posted (sent) data

Type: Property
Access: Read/Write
Data Type: Integer
Parameters: None

Syntax

Property Integer peTranslateSent
Access Type Syntax
Read Access: Get peTranslateSent to IntegerVariable
Write Access: Set peTranslateSent to IntegerVariable/Value

Description

The peTranslateSent property determines character translation for posted (sent) data.

The modes supported are:

Constant Meaning
xtNoTranslate No translation. Data is unchanged
xtUtf8toOem Convert from UTF-8 to Oem - most likely used when loading XML documents.
xtOemtoUtf8 Convert from Oem to UTF-8 - most likely used when sending XML documents

The most likely translation modes for sending data are UTF8 to OEM and None. The default is xtOemtoUtf8.

The messages HttpPostXmlNode, HttpPostXmlString, and HttpPostXmlAddr use this property to determine how posted data should be translated.

The function TranslateData is used to perform data translation. If additional translation modes are needed, this function can be augmented to support those modes.

Sample

Get Create U_cXmlHttpTransfer to hoHttp
Set peTranslateSent of hoHttp to xtNoTranslate     //no translation for
Set peTranslateReceived of hoHttp to xtNoTranslate // posted or received data
Get HttpPostXmlNode of hoHttp "dataaccess.com" ; 
    "MyApplication/XmlService.asp" hoSentXml to hoRcvdXml
Send Destroy of hoHttp
If hoRcvdXml Begin
    // do whatever you need to do with the new XML document
    :
    Send Destroy of hoRcvdXml // programmer must destroy object when done
End