Table of Content
HAL Forum
function string XmlGetAttribute (
xml XMLData,string NodePath,string Attribute)
Description:
Returns the attribute value of a node at specified path in XML data.
Parameters:
XMLData Parsed xml data
NodePath Path to the target node in the XML data in format "parent\child\grandchild\etc".
Attribute Name of the attribute
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:
««