I am trying to read node values and do some arithmetic calculations. This <xmin>174</xmin>
is the line and I want to read 174
and do some arithmetic calculations e.g. using as an integer.
The code below is created for string format. I tired get_nodeValue, get_attributes
instead of get_text
but I could not display the number. I got some unrelevant numbers, I guess they indicate the address.
IXMLDOMNode *pNode = NULL;
BSTR name = NULL;
BSTR NpdeName = NULL;
CHK_HR(pNode->get_nodeName(&bstrNodeName));
printf("Node (%d), <%S>:\n", i, bstrNodeName);
CHK_HR(pNode->get_text(&name));
printf("\t%S\n", name);
The codes below I already tried.
IXMLDOMNamedNodeMap *attribute;
CHK_HR(pNode->get_attributes(&attribute));
printf("\t%d\n", attribute);
AND
VARIANT value;
CHK_HR(pNode->get_nodeValue(&value));
printf("\t%d\n", value);
Thanks in advance...