I am using xm23b->NewChild2("tns2:JobLocation",csLocationId); to create the xml, but I need to set the attribute for this element specifically as in the above example. Is there a way to do it?
asked May 01 '13 at 15:06
Call NewChild instead of NewChild2 so that the created XML child node is returned. Then set the attribute. In pseudo-code:
xChild = xm23b->NewChild("tns2:JobLocation",csLocationId); xChild->AddAttribute("xsi:type","xsd:string"); delete xChild; // (If C++)
answered May 02 '13 at 09:26