![]() |
XML attribute as represented by libxml. More...
#include <LIBXML_DOMDocument.h>
Public Member Functions | |
LIBXML_DOMAttributes (xmlNodePtr pNode) | |
bool | get (const std::string &, std::string &) |
DOMAttributes::map | toMap () |
Private Attributes | |
xmlNodePtr | m_pNode |
XML attribute as represented by libxml.
Definition at line 38 of file LIBXML_DOMDocument.h.
FIX::LIBXML_DOMAttributes::LIBXML_DOMAttributes | ( | xmlNodePtr | pNode | ) | [inline] |
Definition at line 41 of file LIBXML_DOMDocument.h.
00042 : m_pNode(pNode) {}
bool FIX::LIBXML_DOMAttributes::get | ( | const std::string & | name, | |
std::string & | value | |||
) | [virtual] |
Implements FIX::DOMAttributes.
Definition at line 36 of file LIBXML_DOMDocument.cpp.
References m_pNode, QF_STACK_POP, and QF_STACK_PUSH.
00037 { QF_STACK_PUSH(LIBXML_DOMAttributes::get) 00038 00039 xmlChar* result = xmlGetProp(m_pNode, (const xmlChar*)name.c_str()); 00040 if(result == NULL) return false; 00041 value = (char*)result; 00042 xmlFree( result ); 00043 return true; 00044 00045 QF_STACK_POP 00046 }
DOMAttributes::map FIX::LIBXML_DOMAttributes::toMap | ( | ) | [virtual] |
Implements FIX::DOMAttributes.
Definition at line 48 of file LIBXML_DOMDocument.cpp.
References m_pNode, QF_STACK_POP, and QF_STACK_PUSH.
00049 { QF_STACK_PUSH(LIBXML_DOMAttributes::toMap) 00050 00051 xmlAttr* attr = m_pNode->properties; 00052 DOMAttributes::map map; 00053 while( attr != 0 ) 00054 { 00055 std::string value; 00056 std::string name; 00057 if( attr->name ) name = (char*)attr->name; 00058 get(name, value); 00059 map[name] = value; 00060 attr = attr->next; 00061 } 00062 return map; 00063 00064 QF_STACK_POP 00065 }
xmlNodePtr FIX::LIBXML_DOMAttributes::m_pNode [private] |
Definition at line 48 of file LIBXML_DOMDocument.h.