libwolfram20

◆ parse()

void WAImage::parse ( xml_node<> *  imgNode)
private

Parsing a input 'img' xml node.

Precondition
It must be called only one time
Parameters
imgNodeXML Node of image
72 {
73 // Get attributes
74 this->_src = std::string( imgNode->first_attribute("src")->value() );
75 this->_alt = std::string( imgNode->first_attribute("alt")->value() );
76 this->_title = std::string( imgNode->first_attribute("title")->value() );
77 this->_width = atoi(imgNode->first_attribute("width")->value());
78 this->_height = atoi(imgNode->first_attribute("height")->value());
79}
size_t _width
The width of the image in pixels.
Definition: WAImage.h:44
size_t _height
The height of the image in pixels. Scales depending on width setting.
Definition: WAImage.h:45
std::string _src
The exact URL of the image being displayed.
Definition: WAImage.h:41
std::string _title
Descriptive title for internal identification of an image.
Definition: WAImage.h:43
std::string _alt
Alternate text to display in case the image does not render correctly.
Definition: WAImage.h:42