<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 52: Please add access to XmlElement attributes</title><link href="https://sourceforge.net/p/cppunit/feature-requests/52/" rel="alternate"/><link href="https://sourceforge.net/p/cppunit/feature-requests/52/feed.atom" rel="self"/><id>https://sourceforge.net/p/cppunit/feature-requests/52/</id><updated>2008-10-22T21:35:18Z</updated><subtitle>Recent changes to 52: Please add access to XmlElement attributes</subtitle><entry><title>Please add access to XmlElement attributes</title><link href="https://sourceforge.net/p/cppunit/feature-requests/52/" rel="alternate"/><published>2008-10-22T21:35:18Z</published><updated>2008-10-22T21:35:18Z</updated><author><name>Niels Dekker</name><uri>https://sourceforge.net/u/userid-2239627/</uri></author><id>https://sourceforge.net988d88eba666df60c376ac78e9906536d65fb60f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Please add some member functions to CppUnit::XmlElement, providing access to its attributes.  Such member functions would be very helpful to me! Read-only access would be sufficient to me. (I would like to use XML to specify a custom selection of tests, having an XML element for each selected test, having the name of the test as attribute.)&lt;/p&gt;
&lt;p&gt;The current version of CppUnit::XmlElement only has addAttribute functions:&lt;br /&gt;
&lt;a href="http://cppunit.cvs.sourceforge.net/viewvc/cppunit/cppunit/include/cppunit/tools/XmlElement.h?revision=1.6"&gt;http://cppunit.cvs.sourceforge.net/viewvc/cppunit/cppunit/include/cppunit/tools/XmlElement.h?revision=1.6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It seems quite natural to add the following functions:&lt;/p&gt;
&lt;p&gt;int attributeCount() const;&lt;br /&gt;
std::string attributeNameAt( int index ) const;&lt;br /&gt;
std::string attributeValueAt( int index ) const;&lt;/p&gt;
&lt;p&gt;So please consider the attached patch.  The patch includes the implementation of those functions, as well as their tests.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>