Caché Class Definition Reference
XData Blocks
[Home] [Back] 
InterSystems: The power behind what matters   
Class Reference   
Search:    

Describes the structure of an XData block.
Introduction
An XData block is a named unit of data that you include in a class definition, typically for use by a method in the class. Most frequently, it is a well-formed XML document, but it could consist of other forms of data, such as JSON.
Details
An XData block has the following structure:
/// description XData name [ keyword_list ]  { data }
Where:
Example
XData Contents [ XMLNamespace="http://www.intersystems.com/zen" ]
{
  <page xmlns="http://www.intersystems.com/zen" title="HelpDesk">
    <html id="title">My Title</html>
    <hgroup>
      <pane paneName="menuPane"/>
      <spacer width="20"/>
      <vgroup width="100%" valign="top">
        <pane paneName="tablePane"/>
        <spacer height="20"/>
        <pane paneName="detailPane"/>
      </vgroup>
    </hgroup>
  </page>
}
See Also