本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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--;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
}
}
示例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;
}
示例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;
}
示例12: getStringOrNull
Value KJS::getStringOrNull(DOMString s)
{
if (s.isNull())
return Null();
else
return String(s);
}
示例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;
}
示例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;
}
示例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;
}