![]() |
Empty PX_String - strange behaviour on load |
Post Reply ![]() |
Author | ||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1206 |
![]() ![]() ![]() ![]() ![]() Posted: 01 August 2008 at 5:47am |
|
Hi;
I'm using Toolkit 12.0.1 and CXTPPropExchangeXMLNode to store/load settings into/from XML files. When calling PX_String to store empty CString values (GetLength() returns 0) and afterwards calling PX_String to load the empty string from the XML file, I get a string with three newline ASCII code 10 characters in it! Is this a BUG or do I miss something? |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
||
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
Hi, Show code lines
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1206 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Oleg;
Here is my code to store the settings into the XML file:
And here is the counterpart...
In my case, most of the time the parameter "Domain" is an empty string. So storing the empty string and afterwards loading it results in a string with \n three times |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
||
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
Please remove px.SetCompactMode(FALSE); line. or don't format XML:
px.SaveToFile(pszPath, FALSE);
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1206 |
![]() ![]() ![]() ![]() ![]() |
|
Hi Oleg;
Shouldn't it also work with non compact mode and/or formatted XML? Is this a bug of the MSXML implementation? |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
||
Oleg ![]() Senior Member ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
Shouldn't
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |