anchor.diff:          // give the parser the codepage from encoding in the declaration.
           // The .SetCodePage setter cares for the re-encoding of the chunk.
           DeclarationEncodingString := TsdDeclaration(Node).Encoding;
  -        Parser.Encoding := sdCharsetToStringEncoding(DeclarationEncodingString);
  -        Parser.CodePage := sdCharsetToCodePage(DeclarationEncodingString);
   
           DoDebugOut(Self, wsInfo, Format('declaration with encoding "%s" and codepage %d',
             [TsdDeclaration(Node).Encoding, Parser.CodePage]));
  
positive.code:     // finally, free the single tag names list
      FreeAndNil(FSingleTagNames);
    end;
  end;
  
  function TNativeXml.ParseSubstituteContentFromNode(ANode: TXmlNode; const ASubstitute: Utf8String): TXmlNode;
  
negative.code:   i, n: integer;
  begin
  
    // check to see if there are text subnodes
    n := 0;
    for i := 0 to FNodes.Count-1 do
      if FNodes[i].ElementType = xeCharData then
  