attributeValue = xpp.getAttributeValue( "", "type" );
if ( attributeValue != null )
{
if ( !OID.isOID( attributeValue ) )
{
throw new XmlPullParserException( "Incorrect value for 'type' attribute. This is not an OID.", xpp, null );
}
control.setControlType( attributeValue );
}
else
{
throw new XmlPullParserException( "type attribute is required", xpp, null );
}
// CRITICALITY
attributeValue = xpp.getAttributeValue( "", "criticality" );
if ( attributeValue != null )
{
if ( attributeValue.equals( "true" ) )
{
control.setCriticality( true );
}
else if ( attributeValue.equals( "false" ) )
{
control.setCriticality( false );
}
else
{
throw new XmlPullParserException( "Incorrect value for 'criticality' attribute", xpp, null );
}
}
}