Unicode C++
Unicode C++
SearchAllForContent
See more XML Examples
Demonstrates the SearchAllForContent method.Chilkat Unicode C++ Downloads
#include <CkXmlW.h>
void ChilkatSample(void)
{
bool success = false;
CkXmlW xml;
CkXmlW *xBeginAfter = 0;
CkXmlW *xFound = 0;
success = xml.LoadXmlFile(L"qa_data/xml/pigs.xml");
if (success != true) {
wprintf(L"%s\n",xml.lastErrorText());
return;
}
xBeginAfter = xml.GetSelf();
xFound = xml.SearchAllForContent(xBeginAfter,L"*pig*");
bool searchForMore = true;
while ((searchForMore == true)) {
wprintf(L"%s\n",xFound->tag());
wprintf(L"%s\n",xFound->content());
wprintf(L"--\n");
delete xBeginAfter;
xBeginAfter = xFound;
xFound = xml.SearchAllForContent(xBeginAfter,L"*pig*");
searchForMore = xml.get_LastMethodSuccess();
}
delete xBeginAfter;
}