xmlTlCreateSection

CAS XML Script Library

The xmlTlCreateSection function creates a section within the current taglist or section, and adds the first tag to that section.  After this function is called, the xmlTlAddTag function adds tags to the new section until the xmlTlCloseSection function is called.

void xmlTlCreateSection(
  Object xmlTl, // xmlTl object returned from xmlTlNew
  BSTR   TagName, // Tag name for first tag in section
  BSTR   TagData // Tag data to add with the tag
)


Parameters:
xmlTl An xmlTl object returned from the xmlTlNew function. 

TagName Name of tag to add as the first tag in the new section.

TagData Data to add with tag.

Return Value:
None

Example:
function SendCoverText( CoverText, SubjectText )
  {
  var Tl = xmlTlNew();
  xmlTlAddTag(Tl,"SEND_MESSAGE",null);
  xmlTlAddTag(Tl,"REGISTERED_NAME","User1");
  xmlTlAddTag(Tl,"REGISTERED_PASSWORD","");
  xmlTlAddTag(Tl,"TRANSFER_TYPE",0);   // 1= EMAIL, 0=FAX

  xmlTlCreateSection(Tl,"RECEIVER_ADDRESS","555-123-4567");
    xmlTlAddTag(Tl,"RECEIVER_NAME","MyRecipient");
  xmlTlCloseSection(Tl);
    
  xmlTlCreateSection(Tl,"CONTENT_PART",2);  // Cover Message
    xmlTlAddTag(Tl,"CONTENT_TYPE",1);       // File Type ASCII
    xmlTlAddTag(Tl,"CONTENT_DATA",Base64Encode(CoverText));
  xmlTlCloseSection(Tl);

  xmlTlCreateSection(Tl,"CUSTOM_SECTION",null);
    xmlTlAddTag(Tl,"EMAIL_SENT",0);
    xmlTlAddTag(Tl,"SUBJECT",SubjectText);
  xmlTlCloseSection(Tl);
      
  var responseXML = xmlTlSend(Tl,Domain,Server,Protocol,ProxyURL);
    
  return (xmlTlGetTag(responseXML,"STATUS_NUM"));
  }

See Also:
xmlTlNew, xmlTlAddTag, xmlTlCloseSection