pelican/utility/src/ConfigNode.cpp
/**
 * @details
 * Gets the configuration for a given \p tagName with name attribute \p name.
 * If the option is not found \p defValue is returned.
 */
@details
Gets the configuration for a given \p tagName with name attribute \p name.
If the option is not found \p defValue is returned.
@details Gets the configuration for a given \ p tagName with name attribute \ p name . If the option is not found \ p defValue is returned .
QString ConfigNode::getNamedOption(const QString& tagName, const QString& name,
        const QString& attribute, const QString& defValue) const
{
    QDomNode node = _config.namedItem(tagName);
    if (node.isNull()) return defValue;
    QDomNodeList children = node.childNodes();
    for (int c = 0; c < children.size(); c++) {
        QDomElement childElement = children.at(c).toElement();
        if (childElement.tagName() == tagName) {
            if (childElement.attribute("name") == name) {
                return childElement.attribute(attribute);
            }
        }
    }
    return defValue;
}
QString ConfigNode :: getNamedOption ( const QString & tagName , const QString & name , const QString & attribute , const QString & defValue ) const { QDomNode node = _config . namedItem ( tagName ) ; if ( node . isNull ( ) ) return defValue ; QDomNodeList children = node . childNodes ( ) ; for ( int c = 0 ; c < children . size ( ) ; c ++ ) { QDomElement childElement = children . at ( c ) . toElement ( ) ; if ( childElement . tagName ( ) == tagName ) { if ( childElement . attribute ( " " ) == name ) { return childElement . attribute ( attribute ) ; } } } return defValue ; }
@details
 Gets the configuration for a given \p tagName with name attribute \p name.
@details Gets the configuration for a given \ p tagName with name attribute \ p name .