src/xercesc/validators/schema/XUtil.cpp
// Finds and returns the first child node with the given name.
Finds and returns the first child node with the given name.
Finds and returns the first child node with the given name .
DOMElement* XUtil::getFirstChildElementNS(const DOMNode* const parent
                                          , const XMLCh** const elemNames
                                          , const XMLCh* const uriStr
                                          , unsigned int        length)
{
    DOMNode* child = parent->getFirstChild();
    while (child != 0)
	{
        if (child->getNodeType() == DOMNode::ELEMENT_NODE)
		{
            for (unsigned int i = 0; i < length; i++)
			{
                if (XMLString::equals(child->getNamespaceURI(), uriStr) &&
                    XMLString::equals(child->getLocalName(), elemNames[i]))
                    return (DOMElement*)child;
			}
		}
        child = child->getNextSibling();
    }
    return 0;
}
DOMElement * XUtil :: getFirstChildElementNS ( const DOMNode * const parent , const XMLCh * * const elemNames , const XMLCh * const uriStr , unsigned int length ) { DOMNode * child = parent -> getFirstChild ( ) ; while ( child != 0 ) { if ( child -> getNodeType ( ) == DOMNode :: ELEMENT_NODE ) { for ( unsigned int i = 0 ; i < length ; i ++ ) { if ( XMLString :: equals ( child -> getNamespaceURI ( ) , uriStr ) && XMLString :: equals ( child -> getLocalName ( ) , elemNames [ i ] ) ) return ( DOMElement * ) child ; } } child = child -> getNextSibling ( ) ; } return 0 ; }
Finds and returns the first child node with the given name.
Finds and returns the first child node with the given name .
// search for node // not found