View Issue Details

IDProjectCategoryView StatusLast Update
0002634JEDI VCL00 JVCL Componentspublic2005-02-13 07:13
ReporterremkobonteAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 
Summary0002634: Unable to write strings that contain <,> or & chars with TJvAppXMLFileStorage
DescriptionCode:

var
  S: string;
begin
  with TJvAppXMLFileStorage.Create(nil) do
  try
    FileName := 'temp';
    Xml.Options := Xml.Options + [sxoAutoEncodeValue, sxoAutoEncodeEntity];
    WriteString('\path1', '<TEST>');
  finally
    Free;
  end;

  with TJvAppXMLFileStorage.Create(nil) do
  try
    FileName := 'temp';
    Reload;
    Xml.Options := Xml.Options + [sxoAutoEncodeValue, sxoAutoEncodeEntity];
    S := ReadString('\path1');
    ShowMessage(S);
    // Exp: S = '<TEST>'
    // Act: Error
  finally
    Free;
  end;
end;
Additional InformationPossible fix:

Change all

  Xml.Options := [sxoAutoCreate, sxoAutoIndent];
  [..]
  Xml.Options := [sxoAutoIndent];

code in JvAppXMLStorage.pas to

  Xml.Options := Xml.Options + [sxoAutoCreate];
  [..]
  Xml.Options := Xml.Options - [sxoAutoCreate];
TagsNo tags attached.

Activities

obones

2005-02-13 07:13

administrator   ~0006480

Thanks for the feedback, this is now fixed in CVS.
I have introduced three new properties in the StorageOptions:
AutoEncodeValue
AutoEncodeEntity
AutoIndent

That have an impact on the options of the internal XML file, as their name suggest.
I also surfaced the OnEncode and OnDecode events from TJvSimpleXML, shall someone want to use them.
The online help has also been updated

Issue History

Date Modified Username Field Change
2005-02-13 05:08 remkobonte New Issue
2005-02-13 07:13 obones Status new => resolved
2005-02-13 07:13 obones Fixed in Version => 3.00
2005-02-13 07:13 obones Resolution open => fixed
2005-02-13 07:13 obones Assigned To => obones
2005-02-13 07:13 obones Note Added: 0006480