void CIMInstanceNametoXML(CIMObjectPath const& cop, ostream& ostr) { ostr << "<INSTANCENAME CLASSNAME=\""; ostr << cop.getClassName() << "\">"; // // If keys > 1 then must use KEYBINDING - we also use it for // the key == 1 case - most implementations can't cope with // a single KEYVALUE without a KEYBINDING element // if (cop.isInstancePath()) { size_t numkeys = cop.getKeys().size(); for (size_t i = 0; i < numkeys; i++) { CIMProperty cp = cop.getKeys()[i]; ostr << "<KEYBINDING NAME=\""; ostr << cp.getName() << "\">"; outputKEYVALUE(ostr, cp); ostr << "</KEYBINDING>"; } } else { // A singleton, a class without keys } ostr << "</INSTANCENAME>"; }