The rP-XML product allows you to add XML based persistence to your Visual C++* classes with ease.
(1) Simple Example
(2) Complex Example
| Your class | + | rP-XML mapping | = | XML |
class Employee : public XMLPersistent
{
public:
int m_iEmpNum;
int m_iDept;
char *m_pszName;
DECLARE_XMLPERSIST_CLASS;
};
|
BEGIN_XMLPERSIST_CLASS(Employee,employee)
XMLPERSIST_ITEM(m_iEmpNum,emp-nbr)
XMLPERSIST_ITEM(m_iDept,dept)
BEGIN_XMLPERSIST_CONTENTS
XMLPERSIST_ITEM(m_pszName,name)
END_XMLPERSIST
|
<employee emp-nbr="101" dept="10"> John Smith </employee> |