There is no way to have CDATA with charaters past 127. Anyone know the
rationale?
Is there anyway to get the parser to respect Validate=false for
charaters beyond 127?
Thanks,
--
Andrew Brunner
Aurawin LLC
512.574.6298
http://aurawin.com/
Aurawin is a great new place to store, share, and enjoy your
photos, videos, music and more.
program invalid;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, DOM, XMLRead, XMLReader;
procedure Test;
var
FParser:TDOMParser;
FDoc : TXMLDocument;
FSource : TXMLInputSource;
sData:string;
begin
FParser:=TDOMParser.Create();
Try
FParser.Options.Validate:=false;
sData:=Concat(
'<?xml version="1.0"?>',
'<resource>',
'<![CDATA[',
'My',Char(127+random(127)),'Laptop',
']]>',
'</resource>'
);
// sData:=AnsiToUTF8(sData);
FSource:=TXMLInputSource.Create(sData);
Try
FParser.Parse(FSource,FDoc);
Try
finally
FDoc.Free();
end;
finally
FSource.Free();
end;
finally
FParser.Free();
end;
end;
begin
Test();
end.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel