GoDigram for .NET Framework and .NET Core
Northwoods.Go.Xml Namespace / GoXmlBindingTransformer Class / GoXmlBindingTransformer Constructor / GoXmlBindingTransformer Constructor(String,Object)
In This Topic
    GoXmlBindingTransformer Constructor(String,Object)
    In This Topic
    Create a GoXmlBindingTransformer with a given GoXmlTransformer.ElementName and a given Northwoods.Go.GoObject or ICloneable Prototype, whose Type is the GoXmlTransformer.TransformerType.
    Syntax
    public GoXmlBindingTransformer( 
       string eltname,
       object proto
    )

    Parameters

    eltname
    proto
    Remarks

    There is a special use of GoXmlBindingTransformer when it applies to a Northwoods.Go.GoDocument that is the root. If the prototype object is a Northwoods.Go.GoDocument and if it is the value of GoXmlWriter.Objects, this transformer's GoXmlTransformer.ElementName is used as the RootElementName, and GoXmlWriter.GenerateRootAttributes will call this transformer's GenerateAttributes method. If the prototype object is a Northwoods.Go.GoDocument and if an instance of it is the value of GoXmlReader.GoXmlReader.RootObject, GoXmlReader.ConsumeRootAttributes will call this transformer's ConsumeAttributes method. This permits the use of this binding mechanism for binding root attributes with Northwoods.Go.GoDocument properties.

    However, reading such a document will not make a copy of the Northwoods.Go.GoDocument prototype.

    See Also