本文整理汇总了C++中DOMString::isNotNull方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMString::isNotNull方法的具体用法?C++ DOMString::isNotNull怎么用?C++ DOMString::isNotNull使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOMString
的用法示例。
在下文中一共展示了DOMString::isNotNull方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
cmd = EppCommandInfo::fromXML(*node);
}
else if( name.equals("check") )
{
cmd = EppCommandCheck::fromXML(*node);
}
else if( name.equals("renew") )
{
cmd = EppCommandRenew::fromXML(*node);
}
else if( name.equals("transfer") )
{
cmd = EppCommandTransfer::fromXML(*node);
}
else if( name.equals("update") )
{
cmd = EppCommandUpdate::fromXML(*node);
}
/*
* other commands
*/
if( cmd != null )
{
break;
}
}
if( cmd == null )
{
return null;
}
for( 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("creds") )
{
if( cmd->creds == null )
{
//cmd->creds = EppCreds::fromXML(node);
}
}
else if( name.equals("extension") )
{
DOMNodeList* clist = node->getChildNodes();
for( unsigned int j = 0; j < clist->getLength(); j++ )
{
DOMNode* cnode = clist->item(j);
DOMString prefix = cnode->getPrefix();
DOMString cname = cnode->getLocalName();
DOMString nsURI = cnode->getNamespaceURI();
if( cname.isNull() )
{
cname = cnode->getNodeName();
}
if( cname.isNull() )
{
continue;
}
if( cname.equals("neulevel:extension")
|| ( (prefix.isNotNull()) && prefix.equals("neulevel")
&& (cname.isNotNull()) && cname.equals("extension") )
|| cname.equals("ex01:extension") )
{
EppUnspec * unspec = EppUnspec::fromXML(*cnode);
if( unspec != null )
{
cmd->addExtension(unspec);
}
}
else if( cname.isNotNull() )
{
EppExtension * ext = EppExtension::fromXML(*cnode);
if( ext != null )
{
cmd->addExtension(ext);
}
// else other extensions
}
else
{
// other extensions
}
}
}
else if( name.equals("clTRID") )
{
cmd->clTRID = EppUtil::getText(*node);
}
}
return cmd;
}
示例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;
}
示例3: 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;
}
示例4: getDate
time_t EppUtil::getDate( const DOMNode& root, bool dateOnly )
{
time_t cal = 0;
DOMString s = EppUtil::getText(root);
if( s.isNotNull() && s.length() > 0 )
{
char * buf = s.transcode();
if( buf != null )
{
cal = EppUtil::getDate(buf, dateOnly);
XercesString::Delete(buf);
}
}
return cal;
}
示例5: EppChangePollOperation
EppChangePollOperation * EppChangePollOperation::fromXML( const DOMNode& root )
{
EppChangePollOperation * opData = new EppChangePollOperation();
if ( opData == NULL )
{
return opData;
}
opData->setOperation(EppUtil::getText(root));
DOMString subOp = ((DOMElement *) &root)->getAttribute(XS("op"));
if ( subOp.isNotNull() && subOp.length() > 0 )
{
opData->setSubOperation(subOp);
}
return opData;
}
示例6: fromXML
EppLaunchPhase* EppLaunchPhase::fromXML( const DOMNode& root )
{
DOMNamedNodeMap* attrs = root.getAttributes();
EppLaunchPhase *_ret = new EppLaunchPhase();
if( null == _ret )
return null;
{
DOMNode* node = (DOMNode*)&root;
DOMString name = node->getLocalName();
if( name.isNull() )
{
name = node->getNodeName();
}
if( name.isNotNull() )
{
if( name.substringData(0, 7).equals("launch:") )
{
name = name.substringData(7, name.length() - 7);
}
if( name.equals("phase") )
{
_ret->_phase = EppUtil::getText(*node);
}
}
}
for( unsigned int i = 0; i<attrs->getLength(); i++ )
{
DOMNode* attr = attrs->item(i);
DOMString _v = attr->getNodeValue();
if( XS(attr->getNodeName()).equals("name") )
{
_ret->_sub_phase = attr->getNodeValue();
break;
}
}
return _ret;
}
示例7: if
EppTransactionId * EppTransactionId::fromXML( const DOMNode& root )
{
DOMString clTRID = NULLXS;
DOMString svTRID = NULLXS;
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("clTRID") || name.equals("epp:clTRID") )
{
clTRID = EppUtil::getText(*node);
}
else if( name.equals("svTRID") || name.equals("epp:svTRID") )
{
svTRID = EppUtil::getText(*node);
}
}
if( svTRID.isNotNull() )
{
return new EppTransactionId(clTRID, svTRID);
}
return null;
}
示例8: if
EppServiceMenu * EppServiceMenu::fromXML( const DOMNode& root )
{
EppServiceMenu * svcmenu = new EppServiceMenu();
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") )
{
svcmenu->addVersion(EppUtil::getText(*node));
}
else if( name.equals("lang") )
{
svcmenu->addLanguage(EppUtil::getText(*node));
}
else if( name.equals("objURI") )
{
DOMString uri = EppUtil::getText(*node);
if( uri.isNotNull() && uri.length() > 0 )
{
svcmenu->addService(uri);
}
}
else if( name.equals("svcExtension") )
{
DOMNodeList* ulist = node->getChildNodes();
for( unsigned int j = 0; j < ulist->getLength(); j++ )
{
DOMNode* unode = ulist->item(j);
name = unode->getLocalName();
if( name.isNull() )
{
name = unode->getNodeName();
}
if( name.isNull() )
{
continue;
}
else if( name.equals("extURI") )
{
DOMString ext = EppUtil::getText(*unode);
if( ext.isNotNull() && ext.length() > 0 )
{
svcmenu->addServiceExtension(ext);
}
}
}
}
}
return svcmenu;
}
示例9: toXML
DOMElement* EppServiceMenu::toXML( DOMDocument& doc, const DOMString& tag )
{
DOMElement* elm;
DOMElement* body = doc.createElement(tag);
if( version != null )
{
for( unsigned int i = 0; i < version->size(); i++ )
{
DOMString obj = version->elementAt(i);
if( obj.isNotNull() && obj.length() > 0 )
{
elm = doc.createElement(XS("version"));
elm->appendChild(doc.createTextNode(obj));
body->appendChild(elm);
}
}
}
if( lang != null )
{
for( unsigned int i = 0; i < lang->size(); i++ )
{
DOMString obj = lang->elementAt(i);
if( obj.isNotNull() && obj.length() > 0 )
{
elm = doc.createElement(XS("lang"));
elm->appendChild(doc.createTextNode(obj));
body->appendChild(elm);
}
}
}
if( objURI != null )
{
for( unsigned int i = 0; i < objURI->size(); i++ )
{
DOMString obj = objURI->elementAt(i);
if( obj.isNotNull() && obj.length() > 0 )
{
elm = doc.createElement(XS("objURI"));
elm->appendChild(doc.createTextNode(obj));
body->appendChild(elm);
}
}
}
if( (extURI != null) && (extURI->size() > 0) )
{
elm = null;
for( unsigned int i = 0; i < extURI->size(); i++ )
{
DOMString obj = extURI->elementAt(i);
if( obj.isNotNull() && obj.length() > 0 )
{
DOMElement* ext = doc.createElement(XS("extURI"));
ext->appendChild(doc.createTextNode(obj));
if( elm == null )
{
elm = doc.createElement(XS("svcExtension"));
body->appendChild(elm);
}
elm->appendChild(ext);
}
}
}
return body;
}
示例10: print
void EppWriter::print( const DOMNode &node, int level, DOMString prefix )
{
unsigned int i = 0;
int j = 0;
DOMNodeList* list;
DOMNamedNodeMap* attrs;
DOMString newPrefix;
int type = node.getNodeType();
switch( type )
{
case DOMNode::DOCUMENT_NODE:
if( ! canonical )
{
out += XS("<?xml version=\"1.0\" encoding=\"")
+ encoding + "\"?>";
out += "\n";
}
list = node.getChildNodes();
if( list != null )
{
for( i = 0; i < list->getLength(); i++ )
{
print(*list->item(i), level, prefix);
}
}
break;
case DOMNode::ELEMENT_NODE:
for( j = 0; j < level; j++ )
{
out += " ";
}
out += "<";
newPrefix = node.getPrefix();
if( newPrefix.isNotNull() )
{
prefix = newPrefix;
}
if( (newPrefix.isNull()) && (prefix.isNotNull()) )
{
out += prefix;
out += ":";
}
out += node.getNodeName();
attrs = node.getAttributes();
if( attrs != null )
{
for( i = 0; i < attrs->getLength(); i++ )
{
DOMNode* attr = attrs->item(i);
out += " ";
out += attr->getNodeName();
out += "=\"";
out += attr->getNodeValue();
out += "\"";
}
}
list = node.getChildNodes();
if( (list == null) || (list->getLength() == 0) )
{
out += "/>\n";
}
else
{
bool cr = false;
out += ">";
for( i = 0; i < list->getLength(); i++ )
{
if( i == 0 )
{
if( list->item(0)->getNodeType() != DOMNode::TEXT_NODE )
{
out += "\n";
cr = true;
}
}
print(*list->item(i), level + 1, prefix);
}
if( cr )
{
for( j = 0; j < level; j++ )
{
out += " ";
}
}
out += "</";
if( (newPrefix.isNull()) && (prefix.isNotNull()) )
{
out += prefix;
out += ":";
}
out += node.getNodeName();
out += ">\n";
}
break;
case DOMNode::TEXT_NODE:
{
DOMString p = node.getNodeValue();
//.........这里部分代码省略.........
示例11: if
EppResponse * EppResponse::fromXML( const DOMNode& root )
{
unsigned int i;
EppResponse * rsp = null;
DOMNode* response;
bool found = false;
DOMNodeList* list = root.getChildNodes();
for( 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("response") )
{
response = node;
found = true;
break;
}
}
if( found == false )
{
return null;
}
rsp = new EppResponse();
list = response->getChildNodes();
for( 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("result") )
{
EppResult * r = EppResult::fromXML(*node);
if( r != null )
{
rsp->result->addElement(r);
}
}
else if( name.equals("msgQ") )
{
DOMElement * elm = (DOMElement *) node;
DOMString id = elm->getAttribute(XS("id"));
if( id.isNotNull() && id.length() > 0 )
{
rsp->msgId = id;
}
DOMString str = elm->getAttribute(XS("count"));
if( str.isNotNull() && str.length() > 0 )
{
char * p = str.transcode();
if( p != null )
{
rsp->msgQCount = atoi(p);
XercesString::Delete(p);
}
}
DOMNodeList* qlist = node->getChildNodes();
for( unsigned int j = 0; j < qlist->getLength(); j++ )
{
node = qlist->item(j);
name = node->getLocalName();
if( name.isNull() )
{
name = node->getNodeName();
}
if( name.isNull() )
{
continue;
}
if( name.equals("qDate") )
{
rsp->msgQDate = EppUtil::getDate(*node);
}
else if( name.equals("msg") )
{
rsp->msgQText = EppUtil::getText(*node);
}
}
}
else if( name.equals("resData") )
//.........这里部分代码省略.........
示例12: if
EppContactDisclose * EppContactDisclose::fromXML( const DOMNode& root )
{
EppContactDisclose * disc = new EppContactDisclose();
if( disc == null )
{
return disc;
}
DOMString type = ((DOMElement *) &root)->getAttribute(XS("flag"));
if( (type.isNotNull()) &&
(type.equals("0") || type.equals("f") || type.equals("false") ) )
{
disc->setDiscloseFlag(false);
}
else
{
disc->setDiscloseFlag(true);
}
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("name") )
if( name.equals("name") || name.equals("contact:name") )
{
type = ((DOMElement *) node)->getAttribute(XS("type"));
if( (type.isNotNull()) && type.equals("int") )
{
disc->set(TAG_NAME_INT, true);
}
else if( (type.isNotNull()) && type.equals("loc") )
{
disc->set(TAG_NAME_LOC, true);
}
}
// else if( name.equals("org") )
else if( name.equals("org") || name.equals("contact:org") )
{
type = ((DOMElement *) node)->getAttribute(XS("type"));
if( (type.isNotNull()) && type.equals("int") )
{
disc->set(TAG_ORG_INT, true);
}
else if( (type.isNotNull()) && type.equals("loc") )
{
disc->set(TAG_ORG_LOC, true);
}
}
// else if( name.equals("addr") )
else if( name.equals("addr") || name.equals("contact:addr") )
{
type = ((DOMElement *) node)->getAttribute(XS("type"));
if( (type.isNotNull()) && type.equals("int") )
{
disc->set(TAG_ADDR_INT, true);
}
else if( (type.isNotNull()) && type.equals("loc") )
{
disc->set(TAG_ADDR_LOC, true);
}
}
// else if( name.equals("voice") )
else if( name.equals("voice") || name.equals("contact:voice") )
{
disc->set(TAG_VOICE, true);
}
// else if( name.equals("fax") )
else if( name.equals("fax") || name.equals("contact:fax") )
{
disc->set(TAG_FAX, true);
}
// else if( name.equals("email") )
else if( name.equals("email") || name.equals("contact:email") )
{
disc->set(TAG_EMAIL, true);
}
}
return disc;
}