本文整理汇总了C++中CXmlNode::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ CXmlNode::GetNext方法的具体用法?C++ CXmlNode::GetNext怎么用?C++ CXmlNode::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CXmlNode
的用法示例。
在下文中一共展示了CXmlNode::GetNext方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAliases
//----------------------------------------------------
bool CAliasesDictionary::GetAliases(CProduct* product)
{
if (product == NULL)
{
return false;
}
CXmlNode* productNode = this->FindProductNode(product->GetProductClass());
if (productNode == NULL)
{
return false;
}
CXmlNode* child = productNode->GetChildren();
while (child != NULL)
{
if (!str_icmp(child->GetName(), CAliasesDictionary::m_PRODUCT_ELT))
{
child = child->GetNext();
continue;
}
child = child->GetNext();
}
return true;
}
示例2: Parse
void SectionDescriptor::Parse()
{
if ( !GetNode()->HasProp(TYPE_ATTR) ) {
throw wxString::Format(DESCRIPTOR_WRONG_XML + wxString(" %s"), wxString(GetNode()->GetName()));
}
m_type = new wxString(GetNode()->GetPropVal(TYPE_ATTR, ""));
CXmlNode* current = GetNode()->GetChildren();
while ( NULL != current ) {
if ( wxString(current->GetName()).Cmp(COMPOSER_FIELD_ATTR) == 0 ) {
SectionFieldDescriptor* elem = new SectionFieldDescriptor(*current);
m_fields.push_back(elem);
}
current = current->GetNext();
}
}
示例3: FindAliasNode
//----------------------------------------------------
CXmlNode* CAliasesDictionary::FindAliasNode(const std::string& name, CXmlNode* parent, bool allDepths /* = false */)
{
if (parent == NULL)
{
return NULL;
}
CXmlNode* child = parent->GetChildren();
std::string value;
while (child != NULL)
{
if (str_icmp(child->GetName(), CAliasesDictionary::m_ALIAS_ELT))
{
bool bOk = child->GetPropVal(CAliasesDictionary::m_NAME_ATTR, &value);
if (bOk)
{
if (str_icmp(name, value))
{
break;
}
}
}
if ((allDepths) && (child->GetChildren() != NULL))
{
CXmlNode* newChild = FindAliasNode(name, child, allDepths);
if (newChild != NULL)
{
child = newChild;
break;
}
}
child = child->GetNext();
}
return child;
}