本文整理汇总了C++中DOM_Node::getLocalName方法的典型用法代码示例。如果您正苦于以下问题:C++ DOM_Node::getLocalName方法的具体用法?C++ DOM_Node::getLocalName怎么用?C++ DOM_Node::getLocalName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM_Node
的用法示例。
在下文中一共展示了DOM_Node::getLocalName方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: 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;
}
示例4: if
EppCommandInfoSvcsub * EppCommandInfoSvcsub::fromXML( const DOM_Node& root )
{
EppCommandInfoSvcsub * cmd = null;
EppAuthInfo * authInfo = null;
DOMString userid = 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("svcsub:id") )
{
DOMString id = EppUtil::getText(node);
if( cmd == null )
{
cmd = new EppCommandInfoSvcsub(id);
}
}
// if( name.equals("userid") )
if( name.equals("userid") || name.equals("svcsub:userid") )
{
userid = EppUtil::getText(node);
}
// else if( name.equals("authInfo") )
else if( name.equals("authInfo") || name.equals("svcsub:authInfo") )
{
if( authInfo == null )
{
authInfo = EppAuthInfo::fromXML(node);
}
}
}
if( cmd != null )
{
cmd->authInfo = authInfo;
cmd->userid = userid;
}
else if( authInfo != null )
{
delete authInfo;
}
return cmd;
}
示例5: if
EppContact * EppContact::fromXML( const DOM_Node& root )
{
EppContact * contact = new EppContact();
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.substringData(0, 8).equals("contact:") )
{
name = name.substringData(8, name.length() - 8);
}
if( name.equals("id") )
{
contact->id = EppUtil::getText(node);
}
else if( name.equals("ascii") )
{
contact->ascii = EppContactData::fromXML(node);
}
else if( name.equals("i15d") )
{
contact->i15d = EppContactData::fromXML(node);
}
else if( name.equals("voice") )
{
contact->voice = EppE164::fromXML(node);
}
else if( name.equals("fax") )
{
contact->fax = EppE164::fromXML(node);
}
else if( name.equals("email") )
{
contact->email = EppUtil::getText(node);
}
else
{
contact->fromXMLCommon(node, name);
}
}
return contact;
}
示例6: if
EppCommandRenew * EppCommandRenew::fromXML( const DOM_Node& root )
{
DOMString command = root.getLocalName();
DOM_NodeList list = root.getChildNodes();
for( unsigned int i = 0; i < list.getLength(); i++ )
{
DOM_Node node = list.item(i);
DOMString prefix = node.getPrefix();
DOMString name = node.getLocalName();
/*
if( (prefix == null) || (name == null) )
{
continue;
}
if( name.equals(command) )
{
if( prefix.equals("domain") )
{
return EppCommandRenewDomain.fromXML(node);
}
else if( prefix.equals("svcsub") )
{
return EppCommandRenewSvcsub.fromXML(node);
}
}
*/
if( name == null )
{
name = node.getNodeName();
}
if( name.equals("domain:renew") )
{
return EppCommandRenewDomain::fromXML(node);
}
else if( name.equals("svcsub:renew") )
{
return EppCommandRenewSvcsub::fromXML(node);
}
}
return null;
}
示例7: if
EppHost * EppHost::fromXML( const DOM_Node& root )
{
EppHost * host = new EppHost();
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.substringData(0, 5).equals("host:") )
{
name = name.substringData(5, name.length() - 5);
}
if( name.equals("name") )
{
host->setName(EppUtil::getText(node));
}
else if( name.equals("addr") )
{
EppIpAddress * ip = EppIpAddress::fromXML(node);
if ( ip != null )
{
host->addAddress(*ip);
delete ip;
}
}
else
{
host->fromXMLCommon(node, name);
}
}
return host;
}
示例8: if
EppResponseDataCreateDomain * EppResponseDataCreateDomain::fromXML( const DOM_Node& root )
{
DOMString roid = null;
DOMString domain = null;
time_t exDate = 0;
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("roid") )
if( name.equals("roid") || name.equals("domain:roid") )
{
roid = EppUtil::getText(node);
}
// else if( name.equals("name") )
else if( name.equals("name") || name.equals("domain:name") )
{
domain = EppUtil::getText(node);
}
// else if( name.equals("exDate") )
else if( name.equals("exDate") || name.equals("domain:exDate") )
{
exDate = EppUtil::getDate(node);
}
}
return new EppResponseDataCreateDomain(domain, roid, exDate);
}
示例9: if
EppGreeting * EppGreeting::fromXML( const DOM_Node &root )
{
unsigned int i;
EppGreeting * greeting = null;
DOM_NodeList list = root.getChildNodes();
for( 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("greeting") )
{
greeting = new EppGreeting();
list = node.getChildNodes();
break;
}
}
if( greeting == null )
{
return null;
}
for( 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("svID") )
{
greeting->svID = EppUtil::getText(node);
}
else if( name.equals("svDate") )
{
greeting->svDate = EppUtil::getDate(node);
}
else if( name.equals("svcMenu") )
{
if( greeting->svcMenu != null )
{
delete greeting->svcMenu;
}
greeting->svcMenu = EppServiceMenu::fromXML(node);
}
}
return greeting;
}
示例10: if
EppCommand * EppCommand::fromXML( const DOM_Node& root )
{
unsigned int i;
EppCommand * cmd = null;
DOM_Node command;
bool found = false;
DOM_NodeList list = root.getChildNodes();
for( 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("command") )
{
command = node;
found = true;
break;
}
}
if( found == false )
{
return null;
}
list = command.getChildNodes();
for( 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("login") )
{
cmd = EppCommandLogin::fromXML(node);
}
else if( name.equals("logout") )
{
cmd = EppCommandLogout::fromXML(node);
}
else if( name.equals("poll") )
{
cmd = EppCommandPoll::fromXML(node);
}
else if( name.equals("create") )
{
cmd = EppCommandCreate::fromXML(node);
}
else if( name.equals("delete") )
{
cmd = EppCommandDelete::fromXML(node);
}
else if( name.equals("info") )
{
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++ )
{
//.........这里部分代码省略.........