Hi, I need an XML parser. Don't need it to be validating.
Do I have to use the XML parser that's built in into pocket internet
explorer (PIE)?
How do I use it? samples?
COM interfaces are unnecessarily difficult to use. Maybe some stable bugree
light PocketPC and SmartPhone class out there? Has to be pure API, not MFC
or WTL.

Lisa

Re: XML parser by Andrey

Andrey
Mon Jul 18 02:30:09 CDT 2005

If you don't want to use COM interfaces, you can use Expat
http://www.pocketpcdn.com/libraries/expat.html
--
Andrey

"Lisa Pearlson" <no@spam.plz> wrote in message
news:u$l6YZ2iFHA.3436@tk2msftngp13.phx.gbl...
> Hi, I need an XML parser. Don't need it to be validating.
> Do I have to use the XML parser that's built in into pocket internet
> explorer (PIE)?
> How do I use it? samples?
> COM interfaces are unnecessarily difficult to use. Maybe some stable
> bugree light PocketPC and SmartPhone class out there? Has to be pure API,
> not MFC or WTL.
>
> Lisa
>



Re: XML parser by Lisa

Lisa
Mon Jul 18 09:37:06 CDT 2005

Is GPL, I need to use it in commercial apps.

Ok, so, how can I read an XML file, enumerate nodes, and get node values,
using COM stuff?
Any examples available online?

Lisa

"Andrey Yatsyk [eMVP]" <yatsyk@gmail.com> wrote in message
news:e8o$Lq2iFHA.2904@tk2msftngp13.phx.gbl...
> If you don't want to use COM interfaces, you can use Expat
> http://www.pocketpcdn.com/libraries/expat.html
> --
> Andrey
>
> "Lisa Pearlson" <no@spam.plz> wrote in message
> news:u$l6YZ2iFHA.3436@tk2msftngp13.phx.gbl...
>> Hi, I need an XML parser. Don't need it to be validating.
>> Do I have to use the XML parser that's built in into pocket internet
>> explorer (PIE)?
>> How do I use it? samples?
>> COM interfaces are unnecessarily difficult to use. Maybe some stable
>> bugree light PocketPC and SmartPhone class out there? Has to be pure API,
>> not MFC or WTL.
>>
>> Lisa
>>
>
>



Re: XML parser by a

a
Mon Jul 18 10:46:04 CDT 2005

Take a look at this article:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_dev.asp

http://support.microsoft.com/default.aspx?scid=kb;en-us;301939

--
Alex Yakhnin, .NET CF MVP
www.intelliprog.com | www.opennetcf.org


"Lisa Pearlson" wrote:

> Is GPL, I need to use it in commercial apps.
>
> Ok, so, how can I read an XML file, enumerate nodes, and get node values,
> using COM stuff?
> Any examples available online?
>
> Lisa
>
> "Andrey Yatsyk [eMVP]" <yatsyk@gmail.com> wrote in message
> news:e8o$Lq2iFHA.2904@tk2msftngp13.phx.gbl...
> > If you don't want to use COM interfaces, you can use Expat
> > http://www.pocketpcdn.com/libraries/expat.html
> > --
> > Andrey
> >
> > "Lisa Pearlson" <no@spam.plz> wrote in message
> > news:u$l6YZ2iFHA.3436@tk2msftngp13.phx.gbl...
> >> Hi, I need an XML parser. Don't need it to be validating.
> >> Do I have to use the XML parser that's built in into pocket internet
> >> explorer (PIE)?
> >> How do I use it? samples?
> >> COM interfaces are unnecessarily difficult to use. Maybe some stable
> >> bugree light PocketPC and SmartPhone class out there? Has to be pure API,
> >> not MFC or WTL.
> >>
> >> Lisa
> >>
> >
> >
>
>
>

Re: XML parser by Morten

Morten
Tue Jul 19 05:23:28 CDT 2005

On Mon, 18 Jul 2005 16:37:06 +0200, Lisa Pearlson <no@spam.plz> wrote:

[ About Expat ]

> Is GPL, I need to use it in commercial apps.

Not to go nerdy on you, but the license of Expat is not GPL, it's the "MIT
License". According to <URL: http://en.wikipedia.org/wiki/MIT_License> it
allows reuse both for open source and proprietary software. We have used
expat here, in commercial software, so it should most definately be usable
for you as well.

--
Morten.

Re: XML parser by Lisa

Lisa
Tue Jul 19 09:47:37 CDT 2005

That's not nerdy, it's interesting.
The weblink that was given to me (
http://www.pocketpcdn.com/libraries/expat.html )
Links to http://www.movsoftware.com/expatxml.htm , the company that has
ported it to winCE:


EXPAT is a conforming but non-validating XML 1.0 parser written in C. Futher
information about EXPAT can be seen at http://www.jclark.com/xml/expat.html

mov Software has ported EXPAT to Windows CE, making only trivial changes.
EXPAT is distributed via the GPL or MPL licenses.




"Morten Hanssen" <mortenha@opera.com> wrote in message
news:op.st5ohey0qor6gf@enhanced.oslo.opera.com...
> On Mon, 18 Jul 2005 16:37:06 +0200, Lisa Pearlson <no@spam.plz> wrote:
>
> [ About Expat ]
>
>> Is GPL, I need to use it in commercial apps.
>
> Not to go nerdy on you, but the license of Expat is not GPL, it's the "MIT
> License". According to <URL: http://en.wikipedia.org/wiki/MIT_License> it
> allows reuse both for open source and proprietary software. We have used
> expat here, in commercial software, so it should most definately be usable
> for you as well.
>
> --
> Morten.



Re: XML parser by Andrey

Andrey
Tue Jul 19 10:05:01 CDT 2005

I'm not sure but I think that in GPL application could be linked only GPL or
LGPL code.

So if expat would have only MPL it could not be used in GPL project and if
it would have only GPL it could not be used in non-GPL projects. So it is
two licenses. This is just IMHO on fact why it is two licenses.

--

Andrey



"Lisa Pearlson" <no@spam.plz> wrote in message
news:OMmG5CHjFHA.2444@tk2msftngp13.phx.gbl...
> That's not nerdy, it's interesting.
> The weblink that was given to me (
> http://www.pocketpcdn.com/libraries/expat.html )
> Links to http://www.movsoftware.com/expatxml.htm , the company that has
> ported it to winCE:
>
>
> EXPAT is a conforming but non-validating XML 1.0 parser written in C.
> Futher information about EXPAT can be seen at
> http://www.jclark.com/xml/expat.html
>
> mov Software has ported EXPAT to Windows CE, making only trivial changes.
> EXPAT is distributed via the GPL or MPL licenses.
>
>
>
>
> "Morten Hanssen" <mortenha@opera.com> wrote in message
> news:op.st5ohey0qor6gf@enhanced.oslo.opera.com...
>> On Mon, 18 Jul 2005 16:37:06 +0200, Lisa Pearlson <no@spam.plz> wrote:
>>
>> [ About Expat ]
>>
>>> Is GPL, I need to use it in commercial apps.
>>
>> Not to go nerdy on you, but the license of Expat is not GPL, it's the
>> "MIT License". According to <URL:
>> http://en.wikipedia.org/wiki/MIT_License> it allows reuse both for open
>> source and proprietary software. We have used expat here, in commercial
>> software, so it should most definately be usable for you as well.
>>
>> --
>> Morten.
>
>



Re: XML parser by see

see
Sat Jul 23 04:20:05 CDT 2005

Lisa Pearlson napisa³(a):
> Hi, I need an XML parser. Don't need it to be validating.
> Do I have to use the XML parser that's built in into pocket internet
> explorer (PIE)?
> How do I use it? samples?
> COM interfaces are unnecessarily difficult to use. Maybe some stable bugree
> light PocketPC and SmartPhone class out there? Has to be pure API, not MFC
> or WTL.

I'd recommend TinyXML which is simple,
small and portable XML parser written in C++

http://www.grinninglizard.com/tinyxml/

Cheers
--
Mateusz £oskot
mateusz at loskot dot net

Re: XML parser by Lisa

Lisa
Sat Jul 23 19:26:49 CDT 2005

Thanks.. I can't say I understand why we'd ever have to use the complexity
of COM objects just to parse some text file format (XML). Adding a .h /
.cpp, using run time libraries, seems sooooo much easier. It's amazing how
simething simple always ends up being made so complex.

The unfortunate thing with xml parsers (I used XMLite on desktop) is that
they often don't support unicode.
So, is tinyxml going to work for me you think?

Lisa


"Mateusz £oskot" <see.my@signature.net> wrote in message
news:761f3$42e20bc5$3eb356b9$13616@news.chello.pl...
> Lisa Pearlson napisa³(a):
>> Hi, I need an XML parser. Don't need it to be validating.
>> Do I have to use the XML parser that's built in into pocket internet
>> explorer (PIE)?
>> How do I use it? samples?
>> COM interfaces are unnecessarily difficult to use. Maybe some stable
>> bugree light PocketPC and SmartPhone class out there? Has to be pure API,
>> not MFC or WTL.
>
> I'd recommend TinyXML which is simple,
> small and portable XML parser written in C++
>
> http://www.grinninglizard.com/tinyxml/
>
> Cheers
> --
> Mateusz £oskot
> mateusz at loskot dot net



Re: XML parser by see

see
Sun Jul 24 04:55:30 CDT 2005

Lisa Pearlson napisa³(a):
> Thanks.. I can't say I understand why we'd ever have to use the complexity
> of COM objects just to parse some text file format (XML).

I think your point of view is wrong.
Saying like that I could say "I don't understand why I should
learn and use complexity of C/C++ language to
develop application with 2 buttons".

COM is very nice and if you know it there is minor complexity.
The problem is you have to learn it.

COM gives you/programmers good solution to create reusable and
object-oriented applications.

I'd not say many bad things about COM :-)

> Adding a .h /
> .cpp, using run time libraries, seems sooooo much easier.

But in fact there is no big difference, indeed :-)

> It's amazing how
> simething simple always ends up being made so complex.

I don't get your point.
I think you don't know COM so you are saying it is a bad and comlex
solution.

The same I could say about riding a horse if I can't do it,
I can always go by bike, it's easier right :-) but I'm mobile too.

> The unfortunate thing with xml parsers (I used XMLite on desktop) is that
> they often don't support unicode.

expat... I think it supports UNICODE.

> So, is tinyxml going to work for me you think?

The only way to chekc is to try use it ;-)

Cheers
--
Mateusz £oskot
mateusz at loskot dot net

Re: XML parser by Lisa

Lisa
Sun Jul 24 08:02:57 CDT 2005

So, then you probably can answer this question:

I found this sample below on M$ website.
Indeed I'm not too experienced with COM stuff, but my basic knowledge does
involve
the AddRef and Release functions.
How come in this example below I don't see any of that? Are they so called
'smart pointers' ? I don't think so.

Lisa


IXMLDOMDocument *iXMLDoc = NULL;
IXMLDOMParseError *pParsingErr = NULL;
IXMLDOMElement *iXMLElm = NULL;
IXMLDOMNodeList *iXMLChild = NULL;
IXMLDOMNode *iXMLItem = NULL;

HRESULT hr = ::CoCreateInstance(CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID_IXMLDOMDocument, (LPVOID *)&iXMLDoc);

if (iXMLDoc)
{
iXMLDoc->put_async(VARIANT_FALSE);

// Pocket PC workaround: Remove document safety options
IObjectSafety *pSafety = NULL;
if (SUCCEEDED(iXMLDoc->QueryInterface(IID_IObjectSafety,
(void**)&pSafety)))
{
DWORD dwSupported, dwEnabled;
pSafety->GetInterfaceSafetyOptions(IID_IXMLDOMDocument, &dwSupported,
&dwEnabled );
pSafety->SetInterfaceSafetyOptions(IID_IXMLDOMDocument, dwSupported, 0 );
}

short tEmpty;
hr = iXMLDoc->loadXML(
L"<customer>"
L" <first_name>Joe</first_name>"
L" <last_name>Smith</last_name>"
L"</customer>",
&tEmpty);
if (!SUCCEEDED(hr))
return FALSE;

iXMLDoc->get_documentElement(&iXMLElm);
iXMLElm->get_childNodes(&iXMLChild);
iXMLChild->get_item(1,&iXMLItem);

BSTR bStr;
iXMLItem->get_xml(&bStr);
MessageBox(NULL,bStr,TEXT("Caption"),MB_OK);
}




"Mateusz £oskot" <see.my@signature.net> wrote in message
news:e613c$42e36594$3eb356b9$1539@news.chello.pl...
> Lisa Pearlson napisa³(a):
>> Thanks.. I can't say I understand why we'd ever have to use the
>> complexity of COM objects just to parse some text file format (XML).
>
> I think your point of view is wrong.
> Saying like that I could say "I don't understand why I should
> learn and use complexity of C/C++ language to
> develop application with 2 buttons".
>
> COM is very nice and if you know it there is minor complexity.
> The problem is you have to learn it.
>
> COM gives you/programmers good solution to create reusable and
> object-oriented applications.
>
> I'd not say many bad things about COM :-)
>
> > Adding a .h /
>> .cpp, using run time libraries, seems sooooo much easier.
>
> But in fact there is no big difference, indeed :-)
>
> > It's amazing how
>> simething simple always ends up being made so complex.
>
> I don't get your point.
> I think you don't know COM so you are saying it is a bad and comlex
> solution.
>
> The same I could say about riding a horse if I can't do it,
> I can always go by bike, it's easier right :-) but I'm mobile too.
>
>> The unfortunate thing with xml parsers (I used XMLite on desktop) is that
>> they often don't support unicode.
>
> expat... I think it supports UNICODE.
>
>> So, is tinyxml going to work for me you think?
>
> The only way to chekc is to try use it ;-)
>
> Cheers
> --
> Mateusz £oskot
> mateusz at loskot dot net



Re: XML parser by see

see
Sun Jul 24 09:12:22 CDT 2005

Hi,

Lisa Pearlson napisa³(a):
> How come in this example below I don't see any of that? Are they so called
> 'smart pointers' ? I don't think so.

Do you mean all variables of type IXMLDOM... are smart pointers?
No, they aren't.

ATL (I'd recommend you to learn ATL)
provides two smart pointers for COM: CComPtr and CComQIPtr.
All those smart pointers encapsulates addref/release calls
so programmer is not required to remember about calling addref and
release, so it helps to avoid memory leaks and to control object life time.

Cheers

--
Mateusz £oskot
mateusz at loskot dot net

Re: XML parser by Lisa

Lisa
Sun Jul 24 17:50:12 CDT 2005

So what about the example I found on microsoft website?

They don't seem interface pointers (are they? They don't seem to have
AddRef/Release functions, but their names IXMLDOM .. suggests they are
interface pointers. But no Release anywhere..

Lisa

"Mateusz £oskot" <see.my@signature.net> wrote in message
news:95a46$42e3a1c9$3eb356b9$11875@news.chello.pl...
> Hi,
>
> Lisa Pearlson napisa³(a):
>> How come in this example below I don't see any of that? Are they so
>> called
>> 'smart pointers' ? I don't think so.
>
> Do you mean all variables of type IXMLDOM... are smart pointers?
> No, they aren't.
>
> ATL (I'd recommend you to learn ATL)
> provides two smart pointers for COM: CComPtr and CComQIPtr.
> All those smart pointers encapsulates addref/release calls
> so programmer is not required to remember about calling addref and
> release, so it helps to avoid memory leaks and to control object life
> time.
>
> Cheers
>
> --
> Mateusz £oskot
> mateusz at loskot dot net



Re: XML parser by Lisa

Lisa
Sun Jul 24 20:56:59 CDT 2005

So, the sample I gave you, that I found on the net is buggy because it
doesn't release any of the interface?

Do you see any memory leak in my code below?

// simplified struct
typedef struct NAME
{
std::wstring name;
}
vector<Names> g_vNames;

BOOL InitNamesList()
{
IXMLDOMDocument *iXMLDoc = NULL;
IXMLDOMParseError *pParsingErr = NULL;
IXMLDOMElement *iXMLElm = NULL;
IXMLDOMNodeList *iXMLChilds = NULL;
IXMLDOMNode *iXMLItem = NULL;
IXMLDOMNamedNodeMap *iXMLAttribs = NULL;

BOOL bSuccess = FALSE;

HRESULT hr = ::CoCreateInstance(CLSID_DOMDocument, NULL,
CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
IID_IXMLDOMDocument, (LPVOID *)&iXMLDoc);

if (iXMLDoc)
{
iXMLDoc->put_async(VARIANT_FALSE);

// Pocket PC workaround: Remove document safety options
IObjectSafety *pSafety = NULL;
if (SUCCEEDED(iXMLDoc->QueryInterface(IID_IObjectSafety,
(void**)&pSafety)))
{
DWORD dwSupported, dwEnabled;
pSafety->GetInterfaceSafetyOptions(IID_IXMLDOMDocument, &dwSupported,
&dwEnabled );
pSafety->SetInterfaceSafetyOptions(IID_IXMLDOMDocument, dwSupported, 0 );
pSafety->Release();
}

VARIANT_BOOL vSuccess = VARIANT_FALSE;
/*
hr = iXMLDoc->loadXML(
L"<providers>"
L" <provider name=\"Provider 1\" inserver=\"www1\"/>"
L" <provider name=\"Provider 2\" inserver=\"www2\"/>"
L"</providers>",
&bSuccess);
*/

TCHAR szAppPath[255];
if (!::GetModuleFileName(NULL, szAppPath, ARRAYSIZE(szAppPath)))
goto exitInit;
tstring sPath(szAppPath);
int npos = sPath.rfind(_T("\\"));
if (npos >= 0)
sPath = sPath.substr(0, npos);
else
sPath = _T("");

sPath += _T("\\providers.xml");

if ( IStream* pStream = CMyStream::Create( sPath.c_str() ) )
{
VARIANT_BOOL vSuccess = VARIANT_FALSE;
VARIANT vSource;

VariantInit( &vSource );
vSource.punkVal = pStream;
vSource.vt = VT_UNKNOWN;

hr = iXMLDoc->load(vSource, &vSuccess);

pStream->Release();
}
else
goto exitInit;


if (!SUCCEEDED(hr))
goto exitInit;

iXMLDoc->get_documentElement(&iXMLElm);
iXMLElm->get_childNodes(&iXMLChilds);
iXMLChilds->reset();

while (S_OK == iXMLChilds->nextNode(&iXMLItem))
{
if (S_OK != iXMLItem->get_attributes(&iXMLAttribs))
continue;

NAME p;
BSTR bStr;
if (S_OK == iXMLAttribs->getNamedItem(_T("name"), &iXMLItem))
{
if (S_OK == iXMLItem->get_text(&bStr))
p.name = bStr;
}
g_vNames.push_back(p);
}
}

bSuccess = TRUE;

exitInit:
if (pParsingErr)
pParsingErr->Release();

if (iXMLElm)
iXMLElm->Release();

if (iXMLAttribs)
iXMLAttribs->Release();

if (iXMLItem)
iXMLItem->Release();

if (iXMLChilds)
iXMLChilds->Release();

if (iXMLDoc)
iXMLDoc->Release();

return bSuccess;
}

"Mateusz £oskot" <see.my@signature.net> wrote in message
news:95a46$42e3a1c9$3eb356b9$11875@news.chello.pl...
> Hi,
>
> Lisa Pearlson napisa³(a):
>> How come in this example below I don't see any of that? Are they so
>> called
>> 'smart pointers' ? I don't think so.
>
> Do you mean all variables of type IXMLDOM... are smart pointers?
> No, they aren't.
>
> ATL (I'd recommend you to learn ATL)
> provides two smart pointers for COM: CComPtr and CComQIPtr.
> All those smart pointers encapsulates addref/release calls
> so programmer is not required to remember about calling addref and
> release, so it helps to avoid memory leaks and to control object life
> time.
>
> Cheers
>
> --
> Mateusz £oskot
> mateusz at loskot dot net



Re: XML parser by Lisa

Lisa
Sun Jul 24 21:39:40 CDT 2005

I think I have to release all ->get_text(bStr) calls with
::SysFreeString(bStr) right?
Anything else?


"Lisa Pearlson" <no@spam.plz> wrote in message
news:eH14OwLkFHA.2904@tk2msftngp13.phx.gbl...
> So, the sample I gave you, that I found on the net is buggy because it
> doesn't release any of the interface?
>
> Do you see any memory leak in my code below?
>
> // simplified struct
> typedef struct NAME
> {
> std::wstring name;
> }
> vector<Names> g_vNames;
>
> BOOL InitNamesList()
> {
> IXMLDOMDocument *iXMLDoc = NULL;
> IXMLDOMParseError *pParsingErr = NULL;
> IXMLDOMElement *iXMLElm = NULL;
> IXMLDOMNodeList *iXMLChilds = NULL;
> IXMLDOMNode *iXMLItem = NULL;
> IXMLDOMNamedNodeMap *iXMLAttribs = NULL;
>
> BOOL bSuccess = FALSE;
>
> HRESULT hr = ::CoCreateInstance(CLSID_DOMDocument, NULL,
> CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER,
> IID_IXMLDOMDocument, (LPVOID *)&iXMLDoc);
>
> if (iXMLDoc)
> {
> iXMLDoc->put_async(VARIANT_FALSE);
>
> // Pocket PC workaround: Remove document safety options
> IObjectSafety *pSafety = NULL;
> if (SUCCEEDED(iXMLDoc->QueryInterface(IID_IObjectSafety,
> (void**)&pSafety)))
> {
> DWORD dwSupported, dwEnabled;
> pSafety->GetInterfaceSafetyOptions(IID_IXMLDOMDocument, &dwSupported,
> &dwEnabled );
> pSafety->SetInterfaceSafetyOptions(IID_IXMLDOMDocument, dwSupported,
> 0 );
> pSafety->Release();
> }
>
> VARIANT_BOOL vSuccess = VARIANT_FALSE;
> /*
> hr = iXMLDoc->loadXML(
> L"<providers>"
> L" <provider name=\"Provider 1\" inserver=\"www1\"/>"
> L" <provider name=\"Provider 2\" inserver=\"www2\"/>"
> L"</providers>",
> &bSuccess);
> */
>
> TCHAR szAppPath[255];
> if (!::GetModuleFileName(NULL, szAppPath, ARRAYSIZE(szAppPath)))
> goto exitInit;
> tstring sPath(szAppPath);
> int npos = sPath.rfind(_T("\\"));
> if (npos >= 0)
> sPath = sPath.substr(0, npos);
> else
> sPath = _T("");
>
> sPath += _T("\\providers.xml");
>
> if ( IStream* pStream = CMyStream::Create( sPath.c_str() ) )
> {
> VARIANT_BOOL vSuccess = VARIANT_FALSE;
> VARIANT vSource;
>
> VariantInit( &vSource );
> vSource.punkVal = pStream;
> vSource.vt = VT_UNKNOWN;
>
> hr = iXMLDoc->load(vSource, &vSuccess);
>
> pStream->Release();
> }
> else
> goto exitInit;
>
>
> if (!SUCCEEDED(hr))
> goto exitInit;
>
> iXMLDoc->get_documentElement(&iXMLElm);
> iXMLElm->get_childNodes(&iXMLChilds);
> iXMLChilds->reset();
>
> while (S_OK == iXMLChilds->nextNode(&iXMLItem))
> {
> if (S_OK != iXMLItem->get_attributes(&iXMLAttribs))
> continue;
>
> NAME p;
> BSTR bStr;
> if (S_OK == iXMLAttribs->getNamedItem(_T("name"), &iXMLItem))
> {
> if (S_OK == iXMLItem->get_text(&bStr))
> p.name = bStr;
> }
> g_vNames.push_back(p);
> }
> }
>
> bSuccess = TRUE;
>
> exitInit:
> if (pParsingErr)
> pParsingErr->Release();
>
> if (iXMLElm)
> iXMLElm->Release();
>
> if (iXMLAttribs)
> iXMLAttribs->Release();
>
> if (iXMLItem)
> iXMLItem->Release();
>
> if (iXMLChilds)
> iXMLChilds->Release();
>
> if (iXMLDoc)
> iXMLDoc->Release();
>
> return bSuccess;
> }
>
> "Mateusz £oskot" <see.my@signature.net> wrote in message
> news:95a46$42e3a1c9$3eb356b9$11875@news.chello.pl...
>> Hi,
>>
>> Lisa Pearlson napisa³(a):
>>> How come in this example below I don't see any of that? Are they so
>>> called
>>> 'smart pointers' ? I don't think so.
>>
>> Do you mean all variables of type IXMLDOM... are smart pointers?
>> No, they aren't.
>>
>> ATL (I'd recommend you to learn ATL)
>> provides two smart pointers for COM: CComPtr and CComQIPtr.
>> All those smart pointers encapsulates addref/release calls
>> so programmer is not required to remember about calling addref and
>> release, so it helps to avoid memory leaks and to control object life
>> time.
>>
>> Cheers
>>
>> --
>> Mateusz £oskot
>> mateusz at loskot dot net
>
>



Re: XML parser by see

see
Tue Jul 26 13:23:02 CDT 2005

Lisa Pearlson napisa³(a):
> So what about the example I found on microsoft website?
>
> They don't seem interface pointers (are they? They don't seem to have
> AddRef/Release functions, but their names IXMLDOM .. suggests they are
> interface pointers. But no Release anywhere..

I think that's only an example, cuted-pasted piece of code
but it is not complete, so author suppose tha programmer will
initialize and clear all objects as he should.

Cheers

--
Mateusz £oskot
mateusz at loskot dot net