当前位置: 首页>>代码示例>>C++>>正文


C++ DOMString::equals方法代码示例

本文整理汇总了C++中DOMString::equals方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMString::equals方法的具体用法?C++ DOMString::equals怎么用?C++ DOMString::equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DOMString的用法示例。


在下文中一共展示了DOMString::equals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: if

EppResponseDataTransferContact * EppResponseDataTransferContact::fromXML( const DOM_Node& root )
{
    EppResponseDataTransferContact * res = null;
    DOM_NodeList list = root.getChildNodes();
    for( unsigned int i = 0; i < list.getLength(); i++ )
    {
        DOM_Node node = list.item(i);
        DOMString name = node.getLocalName();
        if( name == null )
        {
            name = node.getNodeName();
        }
        if( name == null )
        {
            continue;
        }
//		if( name.equals("id") )
        if( name.equals("id") || name.equals("contact:id") )
        {
            if( res == null )
            {
                DOMString id = EppUtil::getText(node);
                res = new EppResponseDataTransferContact(id);
            }
        }
        else if( res != null )
        {
            res->fromXMLCommon(node, name);
        }
    }

    return res;
}
开发者ID:davin-bao,项目名称:registrar_epp04toolkit,代码行数:33,代码来源:EppResponseDataTransferContact.cpp

示例2: if

EppCredsOptions * EppCredsOptions::fromXML( const DOMNode& root )
{
    DOMString version;
    DOMString lang;

    DOMNodeList* list = root.getChildNodes();
    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();
        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        if( name.equals("version") )
        {
            version = EppUtil::getText(*node);
        }
        else if( name.equals("lang") )
        {
            lang = EppUtil::getText(*node);
        }
    }

    if( (version.isNotNull()) && (lang.isNotNull()) )
    {
        return new EppCredsOptions(version, lang);
    }

    return null;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:35,代码来源:EppCredsOptions.cpp

示例3: EppResponseDataPoll

EppResponseDataPoll * EppResponseDataPoll::fromXML( const DOMNode& root )
{
    DOMString name = root.getLocalName();
    EppPollable * object = null;
    if( name.isNull() )
    {
        name = root.getNodeName();
    }
    if( name.isNull() )
    {
        return null;
    }
    //if( name.equals("transfer") )
    if(    name.equals("transfer")
        || name.equals("contact:transfer")
        || name.equals("domain:transfer")
        || name.equals("svcsub:transfer") )
    {
        object = EppCommandTransfer::fromXMLPoll(root);
    }
    if( object == null )
    {
        return null;
    }

    EppResponseDataPoll * rsp = new EppResponseDataPoll();
    rsp->object = object;
    rsp->freeable = true;

    return rsp;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:31,代码来源:EppResponseDataPoll.cpp

示例4: EppCommandCheckContact

EppCommandCheckContact * EppCommandCheckContact::fromXML( const DOM_Node& root )
{
    EppCommandCheckContact * cmd = new EppCommandCheckContact();
    DOM_NodeList list = root.getChildNodes();
    for( unsigned int i = 0; i < list.getLength(); i++ )
    {
        DOM_Node node = list.item(i);
        DOMString name = node.getLocalName();
        if( name == null )
        {
            name = node.getNodeName();
        }
        if( name == null )
        {
            continue;
        }
        if( name.equals("id") || name.equals("contact:id") )
        {
            DOMString id = EppUtil::getText(node);
            cmd->addId(id);
        }
    }

    return cmd;
}
开发者ID:davin-bao,项目名称:registrar_epp04toolkit,代码行数:25,代码来源:EppCommandCheckContact.cpp

示例5: fromXML

EppCommandCreateSecDns* EppCommandCreateSecDns::fromXML( const DOMNode &root )
{
    EppCommandCreateSecDns * cmd  = new EppCommandCreateSecDns();
    if( cmd == null )
    {
        return null;
    }

    DOMNodeList* list  = root.getChildNodes();
    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();

        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        if( name.substringData(0, 7).equals("secDNS:") )
        {
            name = name.substringData(7, name.length() - 7);
        }
        if( name.equals("dsData") )
        {
            EppSecDnsDsData * ds = EppSecDnsDsData::fromXML(*node);
            if( ds != null )
            {
                cmd->add(*ds);
                delete ds;
            }
        }
        else if( name.equals("maxSigLife") )
        {
            DOMString value = EppUtil::getText(*node);
            char *p = value.transcode();
            if( p != null )
            {
                cmd->maxSigLife = ::atoi(p);
                XercesString::Delete(p);
            }
        }
        else if( name.equals("keyData") )
        {
            // FIXME(zhang) not supported
            cmd->keyDataPresent = true;
            EppSecDnsKeyData *kd = EppSecDnsKeyData::fromXML(*node);
            if( kd != null )
            {
                cmd->add(*kd);
                delete kd;
            }
        }
    }
    return cmd;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:59,代码来源:EppCommandCreateSecDns.cpp

示例6: fromXML

EppMarkMark* EppMarkMark::fromXML( const DOMNode& root, const char* ns)
{
    EppMarkMark *_ret    = new EppMarkMark(ns);
    DOMNodeList* list    = root.getChildNodes();

    int nsLen      = strlen(ns);

    if( list == 0 )
    {
        delete _ret;
        return NULL;
    }

    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();

        if( name.isNull() )
        {
            name = node->getNodeName();
        }

        if( name.isNull() )
        {
            continue;
        }
        if( name.substringData(0, nsLen + 1).equals((_ret->getNameSpace() + ":").c_str()) )
        {
            name = name.substringData(nsLen + 1, name.length() - ( nsLen + 1 ));
        }
        if( name.equals("trademark") )
        {
            EppTrademarkData *_tmd = EppTrademarkData::fromXML(*node, ns);
            if( NULL != _tmd )
            {
                _ret->_marks.addElement(_tmd);
            }
        }
        else if ( name.equals("court") )
        {
            EppCourtData *_cd = EppCourtData::fromXML(*node, ns);
            if( NULL != _cd )
            {
                _ret->_marks.addElement(_cd);
            }
        }
        else if ( name.equals("treatyOrStatute") )
        {
            EppTreatyOrStatuteData *_tsd = EppTreatyOrStatuteData::fromXML(*node, ns);
            if( NULL != _tsd )
            {
                _ret->_marks.addElement(_tsd );
            }
        }

    }
    return _ret;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:59,代码来源:EppMarkMark.cpp

示例7: if

EppCreds * EppCreds::fromXML( const DOMNode& root )
{
    DOMString clID;
    DOMString pw;
    DOMString newPW;
    EppCredsOptions * opt = null;
    EppCreds * creds = null;

    DOMNodeList* list = root.getChildNodes();
    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();
        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        if( name.equals("clID") )
        {
            clID = EppUtil::getText(*node);
        }
        else if( name.equals("pw") )
        {
            pw = EppUtil::getText(*node);
        }
        else if( name.equals("newPW") )
        {
            newPW = EppUtil::getText(*node);
        }
        else if( name.equals("options") )
        {
            if( opt != null )
            {
                delete opt;
            }
            opt = EppCredsOptions::fromXML(*node);
        }
    }

    if( (clID.isNotNull()) && (pw.isNotNull()) )
    {
        creds = new EppCreds(clID, pw, newPW);
        if( opt != null )
        {
            creds->setOptions(*opt);
        }
    }

    if( opt != null )
    {
        delete opt;
    }

    return creds;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:59,代码来源:EppCreds.cpp

示例8: if

EppCommandInfoLaunchRegistration* EppCommandInfoLaunchRegistration::fromXML( const DOMNode& root )
{
    EppCommandInfoLaunchRegistration* cmd  = new EppCommandInfoLaunchRegistration();
    if( cmd == null )
    {
        return null;
    }
    DOMNodeList* list      = root.getChildNodes();
    DOMNamedNodeMap* attrs = root.getAttributes();

    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node  = list->item(i);
        DOMString name = node->getLocalName();
        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        if( (name.length() > 7) && name.substringData(0, 7).equals("launch:") )
        {
            name = name.substringData(7, name.length() - 7);
        }
        if( name.equals("phase") )
        {
            EppLaunchPhase *_pptr = EppLaunchPhase::fromXML(*node);
            if( null != _pptr )
            {
                cmd->_phase = *_pptr;
                delete _pptr;
            }
            _pptr = null;
        }
        else if ( name.equals("applicationID") )
        {
            cmd->_appId = EppUtil::getText(*node);
        }
    }
    for( unsigned int i = 0;i<attrs->getLength();i++ )
    {
        DOMNode* attr = attrs->item(i);
        if( XS(attr->getNodeName()).equals("includeMark") )
        {
            DOMString _v = attr->getNodeValue();
            if( _v.length() > 0 )
            {
                if( _v.equals("true") )
                {
                    cmd->includeMark(true);
                }
            }
            break;
        }
    }
    return cmd;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:59,代码来源:EppCommandInfoLaunchRegistration.cpp

示例9: fromXMLCommon

void EppResponseInfoFeeType::fromXMLCommon( const DOMNode& root, EppResponseInfoFeeType* data )
{
    if( NULL == data )
    {
        return;
    }

    EppCommandInfoFeeType::fromXMLCommon(root, data);

    DOMNodeList* list = root.getChildNodes();

    if( NULL == list )
    {
        return;
    }

    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);

        if( NULL == node )
        {
            continue;
        }

        DOMString name = node->getLocalName();

        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }

        if( name.equals("fee") || name.equals("fee:fee") )
        {
            EppFeeFee* f = EppFeeFee::fromXML(*node);
            if( NULL != f )
            {
                data->addFee(f);
            }
            continue;
        }
        if( name.equals("class") || name.equals("fee:class") )
        {
            data->setFeeClass(EppUtil::getText(*node));
            continue;
        }

    }
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:53,代码来源:EppResponseInfoFeeType.cpp

示例10: if

EppCommandTransferContact * EppCommandTransferContact::fromXML( const DOMNode& root )
{
    EppCommandTransferContact * cmd = null;
    EppAuthInfo * authInfo = null;
    DOMNodeList* list = root.getChildNodes();

    for( unsigned int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();

        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        //if( name.equals("id") )
        if( name.equals("id") || name.equals("contact:id") )
        {
            DOMString id = EppUtil::getText(*node);
            if( cmd == null )
            {
                cmd = new EppCommandTransferContact(id);
            }
        }
        //else if( name.equals("authInfo") )
        else if( name.equals("authInfo") || name.equals("contact:authInfo") )
        {
            if( authInfo == null )
            {
                authInfo = EppAuthInfo::fromXML(*node);
            }
        }
    }
    if( cmd != null )
    {
        cmd->authInfo = authInfo;
    }
    else if( authInfo != null )
    {
        delete authInfo;
    }

    return cmd;
}
开发者ID:kobewang,项目名称:registrar_toolkit,代码行数:48,代码来源:EppCommandTransferContact.cpp

示例11: setPrefix

void ElementNSImpl::setPrefix(const DOMString &prefix)
{
    DOMString xml = NodeImpl::getXmlString();
    DOMString xmlURI = NodeImpl::getXmlURIString();

    if (ownerDocument->getErrorChecking()) {
        if (isReadOnly()) {
            throw DOM_DOMException(
                                 DOM_DOMException::NO_MODIFICATION_ALLOWED_ERR,
                                 null);
        }
        if (prefix != null && !((DocumentImpl *)this->getOwnerDocument())->isXMLName(prefix)) {
            throw DOM_DOMException(DOM_DOMException::INVALID_CHARACTER_ERR,
                                   null);
        }
        if (namespaceURI == null) {
            throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
        }
    }
    if (prefix == null || prefix.length() == 0) {
        name = localName;
        return;
    }
    if (ownerDocument->getErrorChecking() &&
        (prefix.equals(xml) && !namespaceURI.equals(xmlURI))) {
        throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
    }
    const XMLCh *p = prefix.rawBuffer();
    for (int i = prefix.length(); --i >= 0;)
        if (*p++ == chColon)	//prefix is malformed
            throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);

    name = prefix + chColon + localName; //nodeName is changed too
}
开发者ID:,项目名称:,代码行数:34,代码来源:

示例12: DOM_DOMException

//Introduced in DOM Level 2
AttrNSImpl::AttrNSImpl(DocumentImpl *ownerDoc,
                       const DOMString &fNamespaceURI,
                       const DOMString &qualifiedName) :
    AttrImpl(ownerDoc, qualifiedName)
{
    DOMString xmlns = NodeImpl::getXmlnsString();
    DOMString xmlnsURI = NodeImpl::getXmlnsURIString();
    this->name = qualifiedName.clone();

    int index = DocumentImpl::indexofQualifiedName(qualifiedName);
    DOMString prefix;
    if (index < 0)
    throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
    bool xmlnsAlone = false;	//true if attribute name is "xmlns"
    if (index == 0) {	//qualifiedName contains no ':'
        if (this->name.equals(xmlns)) {
        if (!fNamespaceURI.equals(xmlnsURI))
        throw DOM_DOMException(DOM_DOMException::NAMESPACE_ERR, null);
        xmlnsAlone = true;
    }
    prefix = null;
    this -> localName = this -> name;
    } else {	//0 < index < this->name.length()-1
    prefix = this->name.substringData(0, index);
    this -> localName =
            this->name.substringData(index+1, this->name.length()-index-1);
    }

    const DOMString& URI = xmlnsAlone ?
        xmlnsURI : mapPrefix(prefix, fNamespaceURI, DOM_Node::ATTRIBUTE_NODE);
    this -> namespaceURI = URI == null ? DOMString(null) : URI.clone();
};
开发者ID:syoutetu,项目名称:ColladaViewer_VC8,代码行数:33,代码来源:AttrNSImpl.cpp

示例13: browseTree

void browseTree(DOMNode* root)
{
    static int indent = 1;
    indent++;

    DOMNodeList* list = root->getChildNodes();
    for( int i = 0; i < list->getLength(); i++ )
    {
        DOMNode* node = list->item(i);
        DOMString name = node->getLocalName();
        if( name.isNull() )
        {
            name = node->getNodeName();
        }
        if( name.isNull() )
        {
            continue;
        }
        if ( name.equals("#text") )
            continue;
        printDash(indent);
        cout<<name<<endl;
        browseTree(node);
    }
    indent--;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:26,代码来源:EppNamespaceParser.cpp

示例14: EppCommandLogin

EppCommandLogin * EppCommandLogin::fromXML( const DOM_Node& root )
{
    EppCommandLogin * cmd = null;
    DOM_NodeList list = root.getChildNodes();
    for( unsigned int i = 0; i < list.getLength(); i++ )
    {
        DOM_Node node = list.item(i);
        DOMString name = node.getLocalName();
        if( name == null )
        {
            name = node.getNodeName();
        }
        if( name == null )
        {
            continue;
        }
        if( name.equals("svcs") )
        {
            EppServiceMenu * menu = EppServiceMenu::fromXML(node);
            if( menu != null )
            {
                cmd = new EppCommandLogin(*menu);
                delete menu;
                return cmd;
            }
        }
    }

    return null;
}
开发者ID:davin-bao,项目名称:registrar_epp04toolkit,代码行数:30,代码来源:EppCommandLogin.cpp

示例15: hasFeature

bool  DOM_DOMImplementation::hasFeature(const DOMString &feature,  const DOMString &version)
{
    bool anyVersion = (version == null || version.length() == 0);
    bool version1_0 = version.equals(DStringPool::getStaticString("1.0"
                                                     , &g1_0
                                                     , reinitDOM_DOMImplementation
                                                     , DOM_DOMImplementationCleanup));
    bool version2_0 = version.equals(DStringPool::getStaticString("2.0"
                                                     , &g2_0
                                                     , reinitDOM_DOMImplementation
                                                     , DOM_DOMImplementationCleanup));

    // case-insensitive compare
    if(!XMLString::compareIString(feature.rawBuffer(), DStringPool::getStaticString("XML"
                                                           , &gXML
                                                           , reinitDOM_DOMImplementation
                                                           , DOM_DOMImplementationCleanup).rawBuffer())
       && (anyVersion || version1_0 || version2_0))
        return true;

    if(!XMLString::compareIString(feature.rawBuffer(), DStringPool::getStaticString("Core"
                                                           , &gCore
                                                           , reinitDOM_DOMImplementation
                                                           , DOM_DOMImplementationCleanup).rawBuffer())
       && (anyVersion || version1_0 || version2_0))
        return true;

    if(!XMLString::compareIString(feature.rawBuffer(), DStringPool::getStaticString("Traversal"
                                                           , &gTrav
                                                           , reinitDOM_DOMImplementation
                                                           , DOM_DOMImplementationCleanup).rawBuffer())
       && (anyVersion || version2_0))
        return true;

    if(!XMLString::compareIString(feature.rawBuffer(), DStringPool::getStaticString("Range"
                                                           , &gRange
                                                           , reinitDOM_DOMImplementation
                                                           , DOM_DOMImplementationCleanup).rawBuffer())
       && (anyVersion || version2_0))
        return true;


    return false;
}
开发者ID:brock7,项目名称:TianLong,代码行数:44,代码来源:DOM_DOMImplementation.cpp


注:本文中的DOMString::equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。