void XMLNodeImpl::printNode( std::ostream& ostr ) const { String name = getName(); XMLAttributeArray aa = getAttrs(); ostr << '<' << name; for ( XMLAttributeArray::const_iterator aiter = aa.begin(); aiter != aa.end(); ++aiter ) { ostr << ' ' << aiter->getName() << "=\"" << XMLEscape(aiter->getValue()) << '"'; } if (getText().empty() && !getChild()) { ostr << "/>"; } else { ostr << '>'; ostr << XMLEscape(getText()); XMLNode curChild = getChild(); while (curChild) { curChild.printNode(ostr); curChild = curChild.getNext(); } ostr << "</" << name << '>'; } }
bool GNEAttributeCarrier::isValid(SumoXMLAttr key, const std::string& value) { UNUSED_PARAMETER(value); return std::find(getAttrs().begin(), getAttrs().end(), key) != getAttrs().end(); }