GoDiagram Win Reference
ConsumeBody Method (GoXmlTransformer)

Consume elements that help define more details or parts of an object.
Syntax
'Declaration
 
Public Overridable Sub ConsumeBody( _
   ByVal obj As Object _
) 
public virtual void ConsumeBody( 
   object obj
)

Parameters

obj
Remarks

If you want to read child (nested) XML elements and have transformer(s) defined for those kinds of elements, it is sufficient to set BodyConsumesChildElements to true and to override ConsumeChild to add those child objects to the parent object. For more sophisticated parsing/traversing of the child XML elements, you may want to override this method to do what you need.

This is called by GoXmlReader.ConsumeObject. If BodyConsumesChildElements is true, this method iterates through the child elements of this XML node, calls ConsumeObject on each one, and then passes the resulting object to ConsumeChild. If XmlReader is available, because UseDOM is false, this method keeps reading until it encounters an EndElement XML node. Otherwise, if we are traversing a DOM, this method enumerates each of the ReaderNode's XML ChildNodes. If BodyConsumesChildElements is false, this calls ConsumeBody on the InheritsFromTransformer, to allow another specific transformer to implement this behavior, or else calls GoXmlWriter.InvokeConsumeBody, to allow this TransformerType's base Type to provide a default behavior.

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

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback