The method
wfcElementTree.Element.GetDiagnostics collects the element diagnostics. The diagnostics include warnings and errors about the value of the element within the context of the feature and the remainder of the element tree.
Use the method
wfcElementTree.wfcElementTree.ElementDiagnostic_Create to create an element diagnostic in an element tree.