Field-Map Scripting

4.14.17 AsXML

AsXML function


Prototype:

function AsXML :string; 

Description:


Syntax:

variable:= attribDefs.AsXML;


Part

Description


variable

A variable declared as a string


attribDefs

A reference to an instance of a TAttribDefsWrapper

Return value:



Note: This function is available since version X8.



See also:

Create; Free; AddAttributeDefAndValueFromFieldMapAttribute; AddAttributeDefAndValueFromFieldMapAttributeExt;AddAttributeValue; AttributeLabel; AttributeType; AttributeRequired; AttributeVisible; AttributeValue; AttributeDefaultValue; AttributeExists; PrintAttributes; PrintAttributesCount; PrintAttribute; LoadFromXML; AsXML; ValuesHaveChanged; RenameAttribute



Example:

var 
  SelectedAttributes: TAttribDefsWrapper ;
  outputXML:string; 
  
begin
  SelectedAttributes:=TAttribDefsWrapper.Create;           
  try
    with SelectedAttributes do begin
      AddAttributeDefAndValueFromFieldMapAttributeExt('Trees','Species_lkp', false, false, true);
      AddAttributeDefAndValueFromFieldMapAttributeExt('Trees','DeadTree_lkp', false, false, true);      
     
      AddAttributeByValue('Height','Height_m','20,5',false,false,false);
      
      AddAttributeDefAndValueFromFieldMapAttribute('Trees','DBH_mm');  
      
      outputXML:=AsXML;
    end;
  finally
    SelectedAttributes.Free;
  end;  

end.