Beispiel #1
0
static TxtNode* TxtChildNodeWithKey(TxtNode* top, const char* keyName) {
    for (TxtNode* node = top->firstChild; node != nullptr; node = node->sibling) {
        if (node->IsTextWithKey(keyName)) {
            return node;
        }
    }
    return nullptr;
}
Beispiel #2
0
static TxtNode *TxtChildNodeWithKey(TxtNode *top, const char *keyName)
{
    size_t n = top->children->Count();
    for (size_t i = 0; i < n; i++) {
        TxtNode *node = top->children->At(i);
        if (node->IsTextWithKey(keyName))
            return node;
    }
    return NULL;
}