Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - working with CXTPPropExchangeXMLNode
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

working with CXTPPropExchangeXMLNode

 Post Reply Post Reply
Author
Message
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Topic: working with CXTPPropExchangeXMLNode
    Posted: 29 August 2008 at 7:49am
Hello,

I can xml.LoadFromFile

PX_..(xml, ....)   read some data

xml.SetLoading(FALSE);

PX_...(&xml,...) write/change/add some data.

xml.SaveToFile(...)

But how can i remove exist entrys ?
Please add some Remove function
RemoveAttribute, RemoveSection, ...

  Jimmy

My current solution:
class CXTPPropExchangeXMLNodeEx : public CXTPPropExchangeXMLNode
{
    bool DeleteAttr(LPCTSTR lpszEntry)
    {
        USES_CONVERSION;
        CXTPDOMNodePtr xmlNodeEntryPtr;

        XTPXML::IXMLDOMNamedNodeMapPtr map;
        m_xmlSectionNode->get_attributes(&map);
        HRESULT hr = map->removeNamedItem(CT2BSTR(lpszEntry), &xmlNodeEntryPtr);
        if (FAILED(hr))
            return false;
        return true;
    }
}

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2008 at 4:09pm
There is ClearSection methos.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jimmy View Drop Down
Senior Member
Senior Member


Joined: 11 November 2003
Location: Austria
Status: Offline
Points: 515
Post Options Post Options   Thanks (0) Thanks(0)   Quote jimmy Quote  Post ReplyReply Direct Link To This Post Posted: 29 August 2008 at 6:10pm
Thanks for answer,

and how can i delete a attribute (CompactMode)
<FB Name="XYD" Some="was" />

i will delete Some from entry.

  Jimmy

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.