ss ak wrote:
I am creating text node
DOMText* prodDataVal = xmldoc->createTextNode(XMLString::transcode("0"));
This is a memory leak. You need to free the pointer returned from
XMLString::transcode() by calling XMLString::release().
currentNode->appendChild(prodDataVal);
But this text node has a value of boolean
and sometimes my node is empty,basically value is not set...as minOccurs=0
An empty string is not a valid lexical value for xsd:boolean or
xsd:dateTime.
can i have empty tags of boolean without values in it???
same is the case when i use datetime type...
No
schema is <xs:element name="Tracking" type="xs:boolean" minOccurs="0"/>
<xs:element name="CreateTime" type="xs:dateTime" minOccurs="0"/>
Please i have to create XML and set values to those element minOccurs=1 by
creating the textnodes as above and leave the rest blank ...so my parser
complains abt the boolean and datatime being empty.
You can either have minOccurs=0 and leave the nodes out, or populate
them with valid data.
Dave