anchor.diff:    SourcePos := P.Position;
     {$endif SOURCEPOS}
   
  -  CharDataString := P.ReadStringUntilChar('<');
  +  s := P.ReadStringUntilChar('<');
  +  CharDataString := sdRigthTrim(s);
     if length(CharDataString) > 0 then
     begin
       // Insert CharData node
  
positive.code:     raise Exception.Create('Can not set text value when there are several text subnodes');
  
    // value that will be set.
    if Length(Value) > 0 then
    begin
  
      // add or update a value
  
negative.code:       Result[i] := '.';
  end;
  
  function sdRigthTrim(const S: Utf8String): Utf8String;
  var
    i: Integer;
  begin
    i := Length(S);
    while (i > 0) and (S[i] <= ' ') do
      Dec(i);
    Result := Copy(S, 1, i);
  end;
  
  function sdTrim(const S: Utf8String): Utf8String;
  var
    I, L: Integer;
  