com.HTTPPart.CreateFromDomDocument

Creates a new HTTPPart object based on given XML document.

Syntax

CreateFromDomDocument(
   x xml.DomDocument)
  RETURNING part-object com.HTTPPart
  1. x is an XML document.

Usage

Creates a new HTTPPart object based on given XML document. To be used via the addPart() method.

Defaults HTTP multipart headers:
  • Content-Type: text/xml; charset=UTF-8
  • Content-Transfer-Encoding: 8bits

A different charset can be set with the setHeader method. For example, setHeader(“Content-Type”,”text/plain; charset=ISO-8859-1”) sets the charset to ISO-8859-1.