Northwoods.GoWeb.Xml Assembly > Northwoods.GoWeb.Xml Namespace > GoXmlBindingTransformer Class : ConsumeChild Method |
When HandlesChildren or GoXmlTransformer.GeneratesPortsAsChildElements is true, and when the parent is a Northwoods.GoWeb.GoGroup and the child is a Northwoods.GoWeb.GoObject, this will add the child object to the group.
To support some flexibility to allow the Northwoods.GoWeb.GoGroup be a property of the parent object instead of requiring the parent to be the Northwoods.GoWeb.GoGroup itself, the child Northwoods.GoWeb.GoObject is added to the parent's ChildrenCollectionPath property, if that value is a Northwoods.GoWeb.GoGroup.
When TreeStructured is true the XML element in the body produces a separate node that is connected by a link to this node. Both the parent and the child are assumed to implement Northwoods.GoWeb.IGoNode. This method makes a copy of TreeLinkPrototype. It finds the port that is the TreeParentNodePortPath property on the parent node, and it finds the port that is the TreeChildNodePortPath property on the child node. Then it sets the Northwoods.GoWeb.IGoLink.Northwoods.GoWeb.IGoLink.FromPort and Northwoods.GoWeb.IGoLink.ToPort properties of the new link to those ports. If TreeLinksToChildren is true, the Northwoods.GoWeb.IGoLink.FromPort is assigned the parent's port, and the Northwoods.GoWeb.IGoLink.ToPort is assigned the child's port. If TreeLinksToChildren is false, the ports are exchanged so that the link goes in the opposite direction. The child node and the link are then added to the GoXmlReader.GoXmlReader.RootObject.
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