@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;
  }
@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;
  }
@ 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

@param eDiagnostics
The source micro element. Never <code>null</code>.
@return The created domain object. May not be <code>null</code>.
Read a &lt ; diagnostics&gt ; element