Reserved Attribute: tag

Description

This attribute renames the current element to the tag name specified.

Attribute Values

The attribute value is the name tag name to be used.

Additional Notes

This tag is in general used in two cases.

  • varref loaded a variable object.
  • object constructed a new object.
In these two cases, it is necessary to use this tag attribute to tell CookXml to use the compatible tag to set attributes and add children.

Examples

In the following XML code, a new instance of foo.MyButton class is created using object tag. Then tag attribute is used to instruct CookXml to treat it as a button object. Lastly, set the object's text attribute to "OK".

<object ctor="foo.MyButton" tag="button" text="OK"/>