GoDigram for .NET Framework and .NET Core
Northwoods.Go.Xml Namespace / GoXmlReader Class / ConsumeRootElement Method
In This Topic
    ConsumeRootElement Method
    In This Topic
    Start the root element.
    Syntax
    protected virtual object ConsumeRootElement()

    Return Value

    The data structure representing the whole document body. If RootObject is non-null, it returns that. If the current element name is associated with a GoXmlBindingTransformer and that transformer's Prototype is a Northwoods.Go.GoDocument, this returns a copy of that Northwoods.Go.GoDocument. Otherwise this returns an empty List.

    Remarks

    You could override this to return a particular collection or collection-like object, such as a GoDocument or a GoCollection. If you return a different kind of root object, you may need to override ConsumeRootAttributes and ConsumeRootBody to handle initializing and adding new objects to your root object.

    The RootObject property is set to the value of this method. All Consume methods will return this value, after having reset the RootObject property to null.

    See Also