Example (TXMLOutputWrapper members):
var
xmlout : TXmlOutputWrapper ;
xmlfile : string ;
tab : TFieldMapTableScriptWrapper ;
begin
xmlfile := ('...') // setting the name of XML File
xmlout := CreateXMLOutput ;
xmlout.WriteComment('Title of the project') ; // creating of the header of XML Output and defining its text fields
xmlout.WriteComment('Research institution') ;
xmlout.BeginDocumentAttrs('DL','') ; // definition of main document attributes
xmlout.WriteString('COMMENT', MyDataLayer['Comment']) ;
xmlout.WriteInteger('SPEED', MyDataLayer['SpeedOfTransport']) ;
xmlout.WriteVariant('CAMPAIGN', MyDataLayer['ResearchCampaign']) ;
xmlout.WriteBoolean('WAS WEATHER GOOD?', MyDataLayer['WeatherGood']) ;
xmlout.EndAttrs ;
xmlout.BeginElementAttrs(Plots.ValueAsString['NameOfPlot']) ; // creating of element and definition of its attributes
xmlout.WriteString('DOMINANT SPECIES', MyChildDataLayer['DominantSpecies']) ;
xmlout.WriteInteger('DENSITY', MyChildDataLayer['CanopyDensity']) ;
xmlout.EndAttrs ;
xmlout.EndElement ; // finishing of element editing
tab := ...
xmlout.AddTableData(tab,'SORTIMENTS') ; // adding of table "SORTIMENTS" to output XML
xmlout.EndDocument ; // finishing of XML document editing
end.
See also:
CreateXMLOutput; WriteComment; WriteString; WriteInteger; WriteVariant; WriteFloat; WriteBoolean; WriteDate; WriteDateTime; WriteDateTimeAsInt64; WriteDateTimeAsInt64WithMiliseconds; AddTableData; AddLayerDate; BeginDocumentAttrs; BeginElementAttrs; EndAttrs; EndElement; EndDocument; FreeXMLOutput; CreateXMLOutputFile
© 2024 IFER-Monitoring and Mapping Solutions