本文整理汇总了C++中DOM_Node::getChildNodes方法的典型用法代码示例。如果您正苦于以下问题:C++ DOM_Node::getChildNodes方法的具体用法?C++ DOM_Node::getChildNodes怎么用?C++ DOM_Node::getChildNodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOM_Node
的用法示例。
在下文中一共展示了DOM_Node::getChildNodes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
示例2: 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++ )
{
//.........这里部分代码省略.........