Official Content

Sets the behavior of the XML representation for a simple member of a Structured Data Type.

Values

Attribute The member represents an Attribute.
CData The member represents CData.
Element The member represents an Element.
Value The member represents a Value.

Scope

Level: SDT member

Runtime/Design time

This property applies only at design time.

Samples

Consider the following Structured Data Type:

SDT1
    Item1 Num(4)
    Item2 Char(20)
 

Which is populated throughout the following code:

SDT1
{
   item1 = 1 
   item2 = 'Value'
}

When the Item1 XML Type property value is set to "Element" (the default value), the SDT XML representation will be as follows:

<SDT1 xmlns="Knowledge Base" >
   <item1>1</item1>
   <item2>Value</item2>
</SDT1>

When the Item2 XML Type property value is set to "CData," the SDT XML representation will be as follows:

<SDT1 xmlns="Knowledge Base">
   <item1>1</item1>
   <item2><![CDATA[value]]></item2>
</SDT1>


When the Item1 XML Type property value is set to "Value," the SDT XML representation will be as follows: 

<SDT1 xmlns="Knowledge Base" >   
   <item2>Value</item2> 
   1
</SDT1>


It is not possible to have more than one "value" by XML node. Otherwise, all values would be concatenated at the end of the node.

When the Item1 XML Type property value is set to "Attribute," the SDT XML representation will be as follows:

<SDT1 xmlns="Knowledge xmlns="Knowledge Base" Item1="1"> 
<item2>Value</item2>
</SDT1>

See Also

XML Information Properties (SDT)
XML Name property (SDT)
XML Namespace property (SDT)
Xml SoapType property (SDT)
XML Null Serialization property (SDT)

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant