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


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

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


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

示例1: 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

示例2: EppAuthInfo

EppAuthInfo * EppAuthInfo::fromXML( const DOMNode& root )
{
	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("pw") )
		if( name.equals("pw") || name.equals("contact:pw") || name.equals("domain:pw") || name.equals("svcsub:pw")
			|| name.equals("xriAU:pw") || name.equals("xriINU:pw") || name.equals("xriINA:pw") || name.equals("xriISV:pw") /* Uncomment for CodeString || name.equals("xriCS:pw")*/ )
		{
			DOMElement * elm = (DOMElement *) node;
			DOMString roid = elm->getAttribute(XS("roid"));
			DOMString value = EppUtil::getText(*node);
			return new EppAuthInfo(XS(TYPE_PW), value, roid);
		}
//		else if( name.equals("ext") )
		else if( name.equals("ext") || name.equals("contact:ext") || name.equals("domain:ext") || name.equals("svcsub:ext")
			|| name.equals("xriAU:ext") || name.equals("xriINU:ext") || name.equals("xriINA:ext") || name.equals("xriISV:ext") )
		{
			return new EppAuthInfo(XS(TYPE_EXT), NULLXS);
		}
	}
	return null;
}
开发者ID:neustar,项目名称:registrar_toolkit,代码行数:33,代码来源:EppAuthInfo.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: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例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: strlen

bool DOM::operator==( const DOMString &a, const char *b )
{
    if ( !b ) return a.isNull();
    unsigned int blen = strlen(b);
    if ( a.isNull() ) return (blen == 0);
    if(a.length() != blen) return false;

    const QChar* aptr = a.impl->s;
    while( blen-- ) {
        if((*aptr++).latin1() != *b++)
            return false;
    }

    return true;
}
开发者ID:crutchwalkfactory,项目名称:motocakerteam,代码行数:15,代码来源:dom_string.cpp

示例11: 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

示例12: getStringOrNull

Value KJS::getStringOrNull(DOMString s)
{
  if (s.isNull())
    return Null();
  else
    return String(s);
}
开发者ID:BackupTheBerlios,项目名称:wxwebcore-svn,代码行数:7,代码来源:kjs_binding.cpp

示例13: value

DOMString HTMLButtonElement::value() const
{
    if(!impl) return DOMString();
    DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);
    if (s.isNull()) return DOMString("");
    return s;
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:7,代码来源:html_form.cpp

示例14: src

DOMString HTMLIFrameElement::src() const
{
    if(!impl) return DOMString();
    DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
    if (!s.isNull())
	s = ownerDocument().completeURL( s );
    return s;
}
开发者ID:BackupTheBerlios,项目名称:wxwebcore-svn,代码行数:8,代码来源:html_base.cpp

示例15: src

DOMString HTMLInputElement::src() const
{
    if(!impl) return DOMString();
    DOMString s = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SRC);
    if (!s.isNull())
        s = ownerDocument().completeURL( s );
    return s;
}
开发者ID:BackupTheBerlios,项目名称:wxwebcore-svn,代码行数:8,代码来源:html_form.cpp


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