ToXml Method

Official Content
This documentation is valid for:

Returns a string with the XML format of the SDT variable data. 


A = B.ToXml(  [boolean IncludeHeader [boolean IncludeState] )

Type Returned:
    Attribute or variable string

    Variable based on SDT

boolean IncludeHeader
    Optional parameter: If true, then the returned string contains this header tag: "<?xml version = "1.0" encoding = "UTF-8"?>". The default value is false.

boolean IncludeState
    Optional parameter: It only applies to Business Components variables. If true, then the returned string contains the auxiliary variables (old values, mode, initialized flag). Otherwise, it only contains the record data. The default value is true.


It is the opposite of FromXML. It returns an XML string with the data of the SDT.

Note: The ToXML method applied to SDTs which have a blob data type item results in an XML in which the blob is represented as a base64 string (SAC #30011)


One of the possible content of the resulting string would be the following: 

<SDTName xmlns = “name_Kb”>
   </Cordinating >


Available since GeneXus X Evolution 2 Upgrade 2.


Objects: Procedures, Transactions, Web Panels
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
Interfaces: Web 

See Also

FromXml Method
Structured Data Type (SDT) object
Serialization of Business Components