Print Page | Close Window

XML parsing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=18905
Printed Date: 28 April 2024 at 10:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XML parsing
Posted By: Algae
Subject: XML parsing
Date Posted: 06 September 2011 at 2:20pm
Does anyone know of a better way to parse a standard XML file where every entry is a section and there are no subsections using the Codejock Toolkit?

Right now I have this sort of thing where I have to release the parse section every time. This seems clunky to me. Usually when something is this goofy, I'm making a mistake or not coding effectively:

void CResultFile::DoPropExchange(CXTPPropExchange* pPX)
{
    CXTPPropExchange *pSec = NULL;
    pSec = pPX->GetSection(_T("RESULT"));
    PX_String(pSec, _T(""), m_result, _T(""));
    CMDTARGET_RELEASE(pSec);
    pSec = pPX->GetSection(_T("TYPE"));
    PX_String(pSec, _T(""), m_type, _T(""));
    CMDTARGET_RELEASE(pSec);
    ...   
}

If anyone could help with some tips it would be greatly appreciated.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net