![]() |
HOWTO Remove a section from CXTPPropExchange |
Post Reply
|
| Author | |
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Topic: HOWTO Remove a section from CXTPPropExchangePosted: 07 January 2008 at 7:53am |
|
Hi;
I'm using CXTPPropExchangeXML to store informations into XML files. Sometimes it's necessary to remove sections from the XML file without touching the remaining content.
Until now I did not find the right way to remove existing sections irreversible from XML nodes.
Perhaps someone can show me the way to solve this...
|
|
|
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 January 2008 at 1:51am |
|
HI,
just call pPX->EmptySection();
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 January 2008 at 3:40am |
|
Hi Oleg;
Does this mean that I have to do it this way:
Node.LoadFromFile(...)
pPX=Node.GetSection(...)
pPX->EmptySection()
Node.SaveToFile(...)
Since the XML files are really big, I prefer a solution that's not always loading/saving the whole content, when only a small part/section is removed.
|
|
|
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 January 2008 at 4:13am |
|
Yes.
How do you want remove section but not load whole xml ?
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
mgampi
Senior Member
Joined: 14 July 2003 Status: Offline Points: 1210 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 January 2008 at 4:15am |
|
Ok, I see!
I have to keep the whole XML in memory while modifying is active.
Once again, thanks for your help!
|
|
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
![]() |
|
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 |