Table of Content
HAL Forum
procedure XmlGetArea (
xml XMLData,string NodePath,var area TargetArea)
Description:
Loads the value between the start and end tag of the specified node in XML data into an area. Good alternative for XmlGet when you have to handle tag contents that are longer than 256 characters.
Parameters:
XMLData Parsed xml data.
NodePath Path to the target node in the XML data in format "parent\child\grandchild\etc".
TargetArea Area that will be filled with the node tag contents.
// This will run right after HansaWorld has been started
global
updating procedure OnApplicationStartup()
begin
  area a;
  xml xdata;

  AddTextToArea("<test><data>",a);

  // add some random data;
  while(GetAreaLength(a)<1512) begin
    AddTextToArea(Chr(Random(90,130)),a);
  end;
  
  AddTextToArea("</test></data>",a);
  xdata = ParseXmlArea(a);
  SetAreaZeroSize(a);
  XmlGetArea(xdata,"test/data",a);
  stopalert(GetAreaLength(a));

  return;
end;
Related topics:
««