New to this XML stuff help would be greatly appreciated. I'm trying to retrieve an XML form that is embedded on an HTML web page. I'm trying to use "IXMLHTTPRequest" to accomplish this I found the below example of how to this in VB. Can you help me translate this to COBOL. Specifically I'm not sure how to create the "FormData" object.
VB EXAMPLE:
Retrieving a FormData object from an HTML form
To construct a FormData object that contains the data from an existing element represents a document section that contains interactive controls to submit information to a web server." href="/en-US/docs/Web/HTML/Element/form"<form>, specify that form element when creating the FormData object:
var formData = new FormData(someFormElement);
For example:
var formElement = document.getElementById("myFormElement");
var request = new XMLHttpRequest();
request.open("POST", "submitform.php");
request.send(new FormData(formElement));
Additional info I've found:
send method
Sends an HTTP request to the server and receives a response.
Syntax
XMLHttpRequest.send(varBody);
Parameters
varBody [in, optional]
Type: any
Any that specifies the body of the message being sent with the request.
|
Value |
Meaning |
|
ArrayBuffer |
A binary data. See FileReader.readAsArrayBuffer. |
|
blob |
A Blob (binary data object). |
|
Document |
A documentnode. |
|
ArrayBufferView |
A typed array view of an ArrayBuffer. |
|
string |
A DOMString. |
|
FormData |
A FormData object. |
FormData object
Contains a set of key/value pairs to send form data. The data is sent in the same format as using the submit method on a form with formEnctype set to "multipart/form-data".
Syntax
var oMyFormData = new FormData();
DOM Information
Inheritance Hierarchy
The FormData does not inherit from any class or interface.
Members
The FormData object has these types of members:
Methods
Methods
The FormData object has these methods.
|
Method |
Description |
|
Adds or appends key/value pairs of data to a FormData object for use with XMLHttpRequest. |



