ph-schematron/src/main/java/com/helger/schematron/pure/exchange/PSReader.java
@Nonnull
  public PSEmph readEmphFromXML (@Nonnull final IMicroElement eEmph)
  {
    final PSEmph ret = new PSEmph ();

    eEmph.forAllAttributes ( (sNS, sAttrName, sVal) -> {
      final String sAttrValue = _getAttributeValue (sVal);
      _warn (ret, "Unsupported attribute '" + sAttrName + "'='" + sAttrValue + "'");
    });

    eEmph.forAllChildren (aEmphChild -> {
      switch (aEmphChild.getType ())
      {
        case TEXT:
          ret.addText (((IMicroText) aEmphChild).getNodeValue ());
          break;
        case ELEMENT:
          final IMicroElement eElement = (IMicroElement) aEmphChild;
          if (CSchematron.NAMESPACE_SCHEMATRON.equals (eElement.getNamespaceURI ()))
          {
            _warn (ret, "Unsupported Schematron element '" + eElement.getLocalName () + "'");
          }
          else
            _warn (ret, "Unsupported namespace URI '" + eElement.getNamespaceURI () + "'");

          break;
        case COMMENT:
          // Ignore comments
          break;
        default:
          _warn (ret, "Unsupported child node: " + aEmphChild);
      }
    });
    return ret;
  }
@Nonnull
  public PSEmph readEmphFromXML (@Nonnull final IMicroElement eEmph)
  {
    final PSEmph ret = new PSEmph ();

    eEmph.forAllAttributes ( (sNS, sAttrName, sVal) -> {
      final String sAttrValue = _getAttributeValue (sVal);
      _warn (ret, "Unsupported attribute '" + sAttrName + "'='" + sAttrValue + "'");
    });

    eEmph.forAllChildren (aEmphChild -> {
      switch (aEmphChild.getType ())
      {
        case TEXT:
          ret.addText (((IMicroText) aEmphChild).getNodeValue ());
          break;
        case ELEMENT:
          final IMicroElement eElement = (IMicroElement) aEmphChild;
          if (CSchematron.NAMESPACE_SCHEMATRON.equals (eElement.getNamespaceURI ()))
          {
            _warn (ret, "Unsupported Schematron element '" + eElement.getLocalName () + "'");
          }
          else
            _warn (ret, "Unsupported namespace URI '" + eElement.getNamespaceURI () + "'");

          break;
        case COMMENT:
          // Ignore comments
          break;
        default:
          _warn (ret, "Unsupported child node: " + aEmphChild);
      }
    });
    return ret;
  }
@ Nonnull public PSEmph readEmphFromXML ( @ Nonnull final IMicroElement eEmph ) { final PSEmph ret = new PSEmph ( ) ; eEmph . forAllAttributes ( ( sNS , sAttrName , sVal ) -> { final String sAttrValue = _getAttributeValue ( sVal ) ; _warn ( ret , "Unsupported attribute '" + sAttrName + "'='" + sAttrValue + "'" ) ; } ) ; eEmph . forAllChildren ( aEmphChild -> { switch ( aEmphChild . getType ( ) ) { case TEXT : ret . addText ( ( ( IMicroText ) aEmphChild ) . getNodeValue ( ) ) ; break ; case ELEMENT : final IMicroElement eElement = ( IMicroElement ) aEmphChild ; if ( CSchematron . NAMESPACE_SCHEMATRON . equals ( eElement . getNamespaceURI ( ) ) ) { _warn ( ret , "Unsupported Schematron element '" + eElement . getLocalName ( ) + "'" ) ; } else _warn ( ret , "Unsupported namespace URI '" + eElement . getNamespaceURI ( ) + "'" ) ; break ; case COMMENT : // Ignore comments break ; default : _warn ( ret , "Unsupported child node: " + aEmphChild ) ; } } ) ; return ret ; }
Read an &lt;emph&gt; element

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