@ Nonnull public PSDiagnostics readDiagnosticsFromXML ( @ Nonnull final IMicroElement eDiagnostics ) { final PSDiagnostics ret = new PSDiagnostics ( ) ; eDiagnostics . forAllAttributes ( ( sNS , sAttrName , sVal ) -> { final String sAttrValue = _getAttributeValue ( sVal ) ; ret . addForeignAttribute ( sAttrName , sAttrValue ) ; } ) ; eDiagnostics . forAllChildElements ( eDiagnosticsChild -> { if ( CSchematron . NAMESPACE_SCHEMATRON . equals ( eDiagnosticsChild . getNamespaceURI ( ) ) ) { if ( eDiagnosticsChild . getLocalName ( ) . equals ( CSchematronXML . ELEMENT_INCLUDE ) ) ret . addInclude ( readIncludeFromXML ( eDiagnosticsChild ) ) ; else if ( eDiagnosticsChild . getLocalName ( ) . equals ( CSchematronXML . ELEMENT_DIAGNOSTIC ) ) ret . addDiagnostic ( readDiagnosticFromXML ( eDiagnosticsChild ) ) ; else _warn ( ret , "Unsupported Schematron element '" + eDiagnosticsChild . getLocalName ( ) + "'" ) ; } else ret . addForeignElement ( eDiagnosticsChild . getClone ( ) ) ; } ) ; return ret ; }
Read a &lt ; diagnostics&gt ; element