27 #include "../../../xml/AbstractWriter.h" 
   28 #include "../../../xml/Reader.h" 
   29 #include "../../SimpleLink.h" 
   37 #ifdef TERRALIB_MOD_XML_ENABLED 
   44   for(std::size_t i = 0; i < n; ++i)
 
   47     std::string attributeValue = reader.
getAttr(i);
 
   49     if(attributeName == 
"href")
 
   50       link->setHref(attributeValue);
 
   52     else if(attributeName == 
"title")
 
   53       link->setTitle(attributeValue);
 
   55     else if(attributeName == 
"role")
 
   56       link->setRole(attributeValue);
 
   58     else if(attributeName == 
"arcrole")
 
   59       link->setArcRole(attributeValue);
 
   61     else if(attributeName == 
"show")
 
   63       if(attributeValue == 
"embed")
 
   66       else if(attributeValue == 
"new")
 
   69       else if(attributeValue == 
"other")
 
   73     else if(attributeName == 
"actuate")
 
   75        if(attributeValue == 
"onLoad")
 
   78       else if(attributeValue == 
"onRequest")
 
   81       else if(attributeValue == 
"other")
 
   86   return link.release();
 
   93   if(!link->getHref().empty())
 
   96   if(!link->getTitle().empty())
 
   99   if(!link->getRole().empty())
 
  102   if(!link->getArcRole().empty())
 
  105   switch(link->getShow())
 
  126   switch(link->getActuate())
 
  144 #endif // TERRALIB_MOD_XML_ENABLED 
This class models a XML reader object. 
 
virtual std::string getAttrLocalName(std::size_t i) const =0
It returns the local part of the attribute name for the i-th attribute. 
 
This class models a XML writer object. 
 
Data serialization for the XLink module. 
 
TEDATAACCESSEXPORT void Save(const std::string &fileName)
 
virtual std::size_t getNumberOfAttrs() const =0
It returns the number of attributes in the case of an element node. 
 
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes. 
 
virtual void writeAttribute(const std::string &attName, const std::string &value)=0