Northwoods.GoWeb.Xml Assembly > Northwoods.GoWeb.Xml Namespace > GoXmlTransformer Class : GenerateAttributes Method |
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.
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