std::cout << indent << " line = " << node->get_line() << std::endl;
//Print attributes:
- const auto attributes = nodeElement->get_attributes();
- for(xmlpp::Element::AttributeList::const_iterator iter = attributes.begin(); iter != attributes.end(); ++iter)
+ for (const auto& attribute : nodeElement->get_attributes())
{
- const auto attribute = *iter;
const auto namespace_prefix = attribute->get_namespace_prefix();
std::cout << indent << " Attribute ";
if(!nodeContent)
{
//Recurse through child nodes:
- auto list = node->get_children();
for(const auto& child : node->get_children())
{
print_node(child, indentation + 2); //recursive
return EXIT_SUCCESS;
}
-
</programlisting>
</para>
<!-- end inserted example code -->