class ValueMetaAndData {

  public boolean loadXml( Node valnode ) {
    valueMeta = null;

    try {
      String valname = XmlHandler.getTagValue( valnode, "name" );
      int valtype = ValueMetaBase.getType( XmlHandler.getTagValue( valnode, "type" ) );
      String text = XmlHandler.getTagValue( valnode, "text" );
      boolean isnull = "Y".equalsIgnoreCase( XmlHandler.getTagValue( valnode, "isnull" ) );
      int len = Const.toInt( XmlHandler.getTagValue( valnode, "length" ), -1 );
      int prec = Const.toInt( XmlHandler.getTagValue( valnode, "precision" ), -1 );
      String mask = XmlHandler.getTagValue( valnode, "mask" );

      valueMeta = ValueMetaFactory.createValueMeta( valname, valtype, len, prec );
      valueData = text;

      if ( mask != null ) {
        valueMeta.setConversionMask( mask );
      }

      if ( valtype != IValueMeta.TYPE_STRING ) {
        IValueMeta originMeta = new ValueMetaString( valname );
        if ( valueMeta.isNumeric() ) {
          originMeta.setDecimalSymbol( "." );
          originMeta.setGroupingSymbol( null );
          originMeta.setCurrencySymbol( null );
        }
        if ( valtype == IValueMeta.TYPE_DATE ) {
          originMeta.setConversionMask( ValueMetaBase.COMPATIBLE_DATE_FORMAT_PATTERN );
        }
        valueData = Const.trim( text );
        valueData = valueMeta.convertData( originMeta, valueData );
      }

      if ( isnull ) {
        valueData = null;
      }
    } catch ( Exception e ) {
      valueData = null;
      return false;
    }

    return true;
  }

  public  ValueMetaAndData();
  public  ValueMetaAndData( IValueMeta valueMeta, Object valueData );
  public  ValueMetaAndData( String valueName, Object valueData );
  public  ValueMetaAndData( Node valnode );

}