示例#1
0
 internal void TrimSpacesInValue()
 {
     if (ValueBuffered)
     {
         XmlComplianceUtil.StripSpaces(chars, valueStartPos, ref valueLength);
     }
     else
     {
         value = XmlComplianceUtil.StripSpaces(value);
     }
 }
示例#2
0
        //
        // ignore EntityHandling flag
        //
        internal override String GetValue()
        {
            char[] data = null;
            int    index = 0, length = 0;

            if (_Value == null)
            {
                if (_StringBuilder != null)
                {
                    _Value = _StringBuilder.ToString();
                    if (!_HasNormalize)
                    {
                        _Value        = XmlComplianceUtil.EndOfLineNormalization(_Value);
                        _HasNormalize = true;
                    }
                }
                else
                {
                    data   = _Scanner.InternalBuffer;
                    index  = _ValueOffset - _Scanner.AbsoluteOffset;
                    length = _ValueLength;
                    if (!_HasNormalize)
                    {
                        _Value        = XmlComplianceUtil.EndOfLineNormalization(data, index, length);
                        _HasNormalize = true;
                    }
                    else
                    {
                        _Value = new String(data, _ValueOffset - _Scanner.AbsoluteOffset, length);
                    }
                }
                if (!_HasNormalize)
                {
                    _HasNormalize = true;
                }
            }
            else if (!_HasNormalize)
            {
                _Value = XmlComplianceUtil.EndOfLineNormalization(_Value);
            }
            return(_Value);
        }