Table of Content
HAL Forum
function xml ParseXMLFile (
string TargetFile)
Description:
Will load and parse xml file into memory for later analyze and extraction.
Parameters:
TargetFile The path and name of the file that holds the xml data. Path should be relevant to HansaWorld root.
global
procedure SonicQIn()
begin
  xml xdata;
  Boolean testf;
  string 255 xstr,tstr;
  string 255 filename,fromfolder,tofolder;
  Integer err;
  
  fromfolder = "tmp\\seb-ee\\incoming\\";
  tofolder = "tmp\\seb-ee\\imported\\";

  filename = FileNameFromFolder(fromfolder,".txt");
  err = MoveFile(filename,fromfolder,tofolder);
  filename = FileNameFromFolder(fromfolder,".txt");

  err = MoveFile(filename,fromfolder,tofolder);
  
  xdata = ParseXMLFile(GetImportFileName);

  xstr = "Response/Process";
  tstr = XmlGetAttribute(xdata,xstr,"filename");

  xstr = "Response/Process/";
  tstr = XmlGet(xdata,xstr & "Code");
  tstr = XmlGet(xdata,xstr & "Description");

  while (TestEOF==false) begin
    xstr = ImportField;
    testf = NextImportLine(true);     
  end;        
  return;
end;
Related topics:
««