Esempio n. 1
0
//
// Visit_Attribute
//
void QED_Deployment_Visitor::
Visit_Attribute (const PICML::Attribute & attr)
{
  PICML::AttributeValue attrval = attr.dstAttributeValue ();

  if (attrval != Udm::null)
  {
    // Create an XML element for the attribute.
    xercesc::DOMElement * element =
      this->doc_->createElementNS (Utils::XStr ("http://www.springframework.org/schema/beans"),
                                   Utils::XStr ("property"));

    element->setAttribute (Utils::XStr ("name"),
                           Utils::XStr (std::string (attr.name ())));

    // Insert the XML element into the document.
    this->root_.top ()->appendChild (element);

    // Save the element and visit the attribute value.
    this->root_.push (element);
    attrval.Accept (*this);
    this->root_.pop ();
  }
}