Exemplo n.º 1
0
        protected virtual void DataParam(DatatypeBuilder builder)
        {
            string name = GetRequiredAttribute("name");

            if (name == null)
            {
                EmptyContent();
                return;
            }

            try {
                if (reader.IsEmptyElement)
                {
                    builder.AddParameter(name, "", this);
                    ReadStartElement();
                }
                else
                {
                    ReadStartElement();
                    string value = ReadPCDATA();
                    if (value != null)
                    {
                        builder.AddParameter(name, value, this);
                    }
                    ReadEndElement();
                }
            } catch (DatatypeException e) {
                ReportError(ERR_BAD_DATATYPE_PARAMETER, name, e.Message);
            }
        }
        protected virtual void DataParam( DatatypeBuilder builder )
        {
            string name = GetRequiredAttribute("name");
            if(name==null) {
            EmptyContent();
            return;
            }

            try {
            if(reader.IsEmptyElement) {
                builder.AddParameter(name,"",this);
                ReadStartElement();
            } else {
                ReadStartElement();
                string value = ReadPCDATA();
                if(value!=null)
                    builder.AddParameter(name,value,this);
                ReadEndElement();
            }
            } catch( DatatypeException e ) {
            ReportError( ERR_BAD_DATATYPE_PARAMETER, name, e.Message );
            }
        }