Exemplo n.º 1
0
void Note::fromXML(const xmlpp::Element &root)
{
    using namespace xmlpp;

    Attribute *attr;
    // title
    attr = root.get_attribute("title");
    sTitle = "";
    if (attr)
    {
        sTitle = attr->get_value();
    }
    // visibility
    attr = root.get_attribute("visible");
    bVisible = false;
    if (attr)
    {
        bVisible = Item::strToBool(attr->get_value());
    }
    // text
    sText = "";
    if (root.has_child_text())
    {
        sText = root.get_child_text()->get_content();
    }
}