GoDiagram Web Reference
GenerateAttributes Method (GoXmlTransformer)

the object being generated
Generate attributes for the current element, helping to render an object.
Syntax
'Declaration
 
Public Overridable Sub GenerateAttributes( _
   ByVal obj As Object _
) 
public virtual void GenerateAttributes( 
   object obj
)

Parameters

obj
the object being generated
Remarks

You will typically override this method to call methods such as WriteAttrVal(String,String) or WriteAttrVal(String,Single) to read property values and set them on the object obj being initialized. The set of attributes usually matches those consumed in an override of ConsumeAttributes.

This is called by GoXmlWriter.GenerateObject. If IdAttributeUsedForSharedObjects is true, this method also sees if GoXmlWriter.GoXmlWriter.FindShared has an identifier associated with the given obj. If so, this writes out an "id" attribute with that identifier string. This method then calls GenerateAttributes on the InheritsFromTransformer, to allow another specific transformer to implement this behavior, or else calls GoXmlWriter.GoXmlWriter.InvokeGenerateAttributes, to allow this TransformerType's base Type to provide a default behavior.

You should not try to define any "xmlns" namespaces. Instead, you can define the default namespace for the root element by setting GoXmlWriter.DefaultNamespace, and you can define namespaces and their prefixes by calling GoXmlWriter.SetNamespaceUri before XML generation.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoXmlTransformer Class
GoXmlTransformer Members

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback