You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Can anyone help me with how to import an existing xml file into a xmldocument? I have used the function xmldocument.load(path) before, but I can not use that in an extension.
thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I have used the following code, which uses UploadIntoStream to load the xml file into an Instream, then XmlDocument.ReadFrom to read the stream into an xmldocument.
Hope it helps.
var
Tempblob : Record Tempblob;
TargetXmlDoc : XmlDocument;
XmlDec : XmlDeclaration;
begin
// Create Xml Document
TargetXmlDoc := XmlDocument.Create;
xmlDec := xmlDeclaration.Create('1.0','UTF-8','');
TargetXmlDoc.SetDeclaration(xmlDec);
// Create Instream & upload file into it
Tempblob.blob.CreateInStream(Instr);
filename := 'Content.xml';
filepath := 'C:\Temp';
UploadIntoStream('Window Title',filepath,'',filename,Instr);
// Read stream into new xml document
Xmldocument.ReadFrom(Instr, TargetXmlDoc);
Hi,
Can anyone help me with how to import an existing xml file into a xmldocument? I have used the function xmldocument.load(path) before, but I can not use that in an extension.
thanks.
The text was updated successfully, but these errors were encountered: