When trying to read xmldata over url I will get xml but xmldocument.loadxml() reads only first line from response.
what is wrong?
code:
static void Job303(Args _args)
{
COM objXHTTP;
xml xmlDocumentOut;
url xmlUrl;
str xmlError;
str xmlDocumentResponse;
//#define.xmlhttp('MSXML2.XMLHTTP')
#define.serverXmlHttp('MSXML2.ServerXMLHTTP')
#define.xmlResolve(3000)
#define.xmlConnect(3000)
#define.xmlSend(3000)
#define.xmlReceive(3000)
interopPermission interopPermission;
int xxx;
XMLNode rootNode, bodyNode,bodyNode1,AttNode;
XMLNodeList bodyLines,childLine;
XMLElement xmlElement;
XMLNodeList _xmlNodelist;
XMLDocument XMLdoc = new XMLDocument();
str filename, nodeName,txtFile,strTxtRow;
str AttName;
int i,j,k;
boolean Valid;
;
xmlDocumentOut = ''; // Set your XML Doc
xmlUrl = 'mirpol.rzeszow.pl/.../itqty2022.xml'; // Set the URL
interopPermission = new InteropPermission(InteropKind::ComInterop);
InteropPermission.assert();
objXHTTP = new COM(#serverxmlHttp);
objXHTTP.settimeouts(#xmlResolve, #xmlConnect, #xmlSend, #xmlReceive);
objXHTTP.Open("POST", xmlUrl, False);
objXHTTP.setRequestHeader("Content-Type", "text/xml.");
objXHTTP.send(xmlDocumentOut);
xmlDocumentResponse = objXHTTP.responseText();
info(xmlDocumentResponse);
XMLDoc.loadxml(xmlDocumentResponse);
objXHTTP = null;
codeAccessPermission::revertAssert();
// XMLdoc.load(@"C:\temp\textIOtest.xml");
rootNode = xmldoc.documentElement();
nodeName = rootnode.baseName();
xmlElement = xmldoc.documentElement();
if(rootnode.hasChildNodes())
{
bodyLines = rootnode.childNodes();
}
}