Ant Organisation Ltd documentation

XmlHelper.GetExtensionBlock Method 

Gets the extension block for the relevant type

public static XmlDocument GetExtensionBlock(
   XmlDocument blocks,
   string blockType
);

Parameters

blocks
XmlDocument holding various types
blockType
Name of the type that we wish to retrieve

Return Value

XmlDocument with just the correct block in it

Remarks

Takes XML of the form:

             <AnyName>
               <extension type="validation"> ... contents ... </extension>
               <extension type="otherInformation"> ... contents ... </extension>
               <extension type="foobar"> ... contents ... </extension>
             </AnyName>
            
And returns:
               <extension type="validation"> ... contents ... </extension>
            	
Also handles single extensions in the form of:
               <extension type="validation"> ... contents ... </extension>
            		

See Also

XmlHelper Class | Ant.ContentEntry Namespace