You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have bumbled my way along with using this library and everything has worked great.
Now I have a need to store a XMLElement from the document for processing later in my code.
In general my XML document looks like this (with simplified attributes): <tags> <tag> <data now=""/> <data now=""/> <default> <data extra=""/> <data extra=""/> </default> </tag> </tags>
The <tag><data ...> stuff is all working fine.
I want to copy the whole <default>...</default> part to something (maybe a XMLDocument in my class data?) so I can process it later when needed. Is this possible?
I tried this, thinking I would at least be able to print and view the copied element. But all I get is the printf() message: XMLElement *element ; element = tag_element->FirstChildElement("default"); if (element) { printf("tag has default data\n"); XMLDocument doc; element->DeepClone(&doc); doc.Print(); }
Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
I have bumbled my way along with using this library and everything has worked great.
Now I have a need to store a XMLElement from the document for processing later in my code.
In general my XML document looks like this (with simplified attributes):
<tags>
<tag>
<data now=""/>
<data now=""/>
<default>
<data extra=""/>
<data extra=""/>
</default>
</tag>
</tags>
The
<tag><data ...>
stuff is all working fine.I want to copy the whole
<default>...</default>
part to something (maybe a XMLDocument in my class data?) so I can process it later when needed. Is this possible?I tried this, thinking I would at least be able to print and view the copied element. But all I get is the printf() message:
XMLElement *element ;
element = tag_element->FirstChildElement("default");
if (element) {
printf("tag has default data\n");
XMLDocument doc;
element->DeepClone(&doc);
doc.Print();
}
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: