procedure Load;
var
str: String;
begin
Str:=XMLStrings.Text;
DOM.LoadMemory(Str[1], Length(Str));
end;
It works, when Str is of String type. When it is WideString, then it raises exception, smth like 'Invalid XML char', but in help it is written that it must work with WideStrings.
Then I tred following code:
procedure Load;
var
str: String;
begin
Str:=UTF8Encode(XMLStrings.Text);
DOM.LoadMemory(Str[1], Length(Str));
end;
It works well, but DOM(my TXpDocumentObject) replaces cyrillic unicode chars with smth like '₯' and it doesn't suit me.
Is there any solution to load xml WideString from memory? It works well, when you load it from unicode file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have small piece of code:
procedure Load;
var
str: String;
begin
Str:=XMLStrings.Text;
DOM.LoadMemory(Str[1], Length(Str));
end;
It works, when Str is of String type. When it is WideString, then it raises exception, smth like 'Invalid XML char', but in help it is written that it must work with WideStrings.
Then I tred following code:
procedure Load;
var
str: String;
begin
Str:=UTF8Encode(XMLStrings.Text);
DOM.LoadMemory(Str[1], Length(Str));
end;
It works well, but DOM(my TXpDocumentObject) replaces cyrillic unicode chars with smth like '₯' and it doesn't suit me.
Is there any solution to load xml WideString from memory? It works well, when you load it from unicode file.
Hi,
What delphi version do you use ?
Kind regards,
Matthias.