libwolfram20

◆ parse()

void WASubpod::parse ( xml_node<> *  subpod)
private

Parsing the input subpod.

Precondition
It must be called only once
Parameters
[in]subpodXML Node of subpod
84 {
85 // Get 'title' attribute
86 this->_title = std::string( subpod->first_attribute("title")->value() );
87
88 // Get included plaintext
89 xml_node<>* plainNode = subpod->first_node("plaintext");
90 this->_plain = std::string( plainNode->value() );
91
92 // Reading 'img' block
93 xml_node<>* imgNode = subpod->first_node("img");
94 this->_img = nullptr;
95 if (imgNode != nullptr) this->_img = new WAImage(imgNode);
96}
Wolfram API image.
Definition: WAImage.h:24
WAImage * _img
Included img block.
Definition: WASubpod.h:41
std::string _title
TODO.
Definition: WASubpod.h:39
std::string _plain
TODO.
Definition: WASubpod.h:40