How to: Add XML Class Data

You can add or modify XML class data that maps XML serialization behavior against elements of your domain-specific language definition as described in the following procedure.

To add XML class data

  1. In DSL Explorer, right-click the Xml Serialization Behavior node, and click Add New Xml Class Data.

    A new Xml Class Data node appears under the Class Data node, which is under the Xml Serialization Behavior node.

  2. Click the new node.

  3. In the Properties window, change the properties to meet your requirements as described in the following table:

    Property

    Description

    Is Custom

    If True, serialization of elements of the designated domain class is defined in custom code.

    Domain Class

    Class to which the xml serialization configuration data applies.

    Element Name

    Xml element used to serialize elements of the designated domain class.

    Moniker Attribute Name

    Name of attribute used in moniker elements to contain the reference. If blank, the name of the key property or id is used.

    Moniker Element Name

    Name of the xml element used for monikers to elements of the designated class.

    Moniker Type Name

    Name of the xsd type generated for monikers to elements of this class.

    Serialize Id

    It True, serialize the element Id.

    Type Name

    Name of the xml type generated in the xsd from the designated domain class.

    You can now add XML property data and XML relationship data. For more information, see How to: Add XML Property Data and How to: Add XML Relationship Data.

See Also

Other Resources

Customizing Serialization Behavior

Domain-Specific Language Tools Glossary