pelican/utility/src/ConfigNode.cpp
/**
 * @details
 * Gets the configuration text for the given \p tagName.
 * If the \p tagName and/or text do not exist, \p defValue is returned.
 */
@details
Gets the configuration text for the given \p tagName.
If the \p tagName and/or text do not exist, \p defValue is returned.
@details Gets the configuration text for the given \ p tagName . If the \ p tagName and / or text do not exist \ p defValue is returned .
QString ConfigNode::getOptionText(const QString& tagName,
        const QString& defValue) const
{
    QDomNode node = _config.namedItem(tagName);
    if (node.isNull()) return defValue;
    QDomNodeList children = node.childNodes();
    QString text;
    for (int c = 0; c < children.size(); c++) {
        if (children.at(c).nodeType() == QDomNode::TextNode) {
            text += children.at(c).nodeValue();
        }
    }
    return text.isEmpty() ? defValue : text;
}
QString ConfigNode :: getOptionText ( const QString & tagName , const QString & defValue ) const { QDomNode node = _config . namedItem ( tagName ) ; if ( node . isNull ( ) ) return defValue ; QDomNodeList children = node . childNodes ( ) ; QString text ; for ( int c = 0 ; c < children . size ( ) ; c ++ ) { if ( children . at ( c ) . nodeType ( ) == QDomNode :: TextNode ) { text += children . at ( c ) . nodeValue ( ) ; } } return text . isEmpty ( ) ? defValue : text ; }
@details
 Gets the configuration text for the given \p tagName.
@details Gets the configuration text for the given \ p tagName .