We are trying to migrate our Delphi Environement from Delphi2007 to Delphi XE2. We dowloaded the latest Turbopower xml partner from Sourceforge. net. When we make a simple test to load a xml file we get an error "Invalid XML Character found" Our lines of code
var
testxml : UnicodeString; // a normal String in Xe2
FModel: TXpObjModel;
begin
FModel := TXpObjModel.Create(nil); //Step 1
FModel.LoadMemory(testxml[1], Length(testxml)); //Step2
end.
The code fails at Step 2. when the variable "Textxml" type is changed to ansiString Then the xml is loaded properly.
XML Encoding is UTF-8
something like this
<?xml version="1.0" encoding="UTF-8">
so can any one suggest us how to load xml data stored in Unicode string variable type?