31 TagList::const_iterator it = l.begin();
32 for( ; it != l.end(); ++it )
34 if( (*it)->name() !=
"header" || !(*it)->hasAttribute(
"name" ) )
37 m_headers.insert( std::make_pair( (*it)->findAttribute(
"name" ), (*it)->cdata() ) );
47 static const std::string filter =
"/presence/headers[@xmlns='" +
XMLNS_SHIM +
"']"
48 "|/message/headers[@xmlns='" +
XMLNS_SHIM +
"']"
55 if( !m_headers.size() )
58 Tag* t =
new Tag(
"headers" );
61 HeaderList::const_iterator it = m_headers.begin();
62 for( ; it != m_headers.end(); ++it )
64 Tag* h =
new Tag( t,
"header" );
std::map< std::string, std::string > HeaderList
virtual const std::string & filterString() const
SHIM(const HeaderList &hl)
virtual Tag * tag() const
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
This is an abstraction of an XML element.
bool setCData(const std::string &cdata)
const std::string xmlns() const
bool addAttribute(Attribute *attr)
const std::string & name() const
const TagList & children() const
bool setXmlns(const std::string &xmlns, const std::string &prefix=EmptyString)
The namespace for the gloox library.
std::list< Tag * > TagList
const std::string XMLNS_SHIM