![]() |
Empty PX_String - strange behaviour on load |
Post Reply
|
| Author | ||
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Topic: Empty PX_String - strange behaviour on loadPosted: 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 |
Post Options
Thanks(0)
Quote Reply
Posted: 03 August 2008 at 4:16am |
|
|
Hi, Show code lines
|
||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 07 August 2008 at 5:29pm |
|
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 August 2008 at 6:19am |
|
|
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: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 10 August 2008 at 11:10am |
|
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 11 August 2008 at 2:11am |
|
|
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 |