Home / Possible bug in CreditDefaultSwapData::toXML

Home Forums Help Possible bug in CreditDefaultSwapData::toXML

This topic contains 0 replies, has 1 voice, and was last updated by  coling 3 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #6660


    I’m trying to write some CDS that I have built in the OREData object (ore::data::CreditDefaultSwap) out to XML, but running into a failed assert from RapidXML. I’ve traced it to the CreditDefaultSwapData::toXML function.

    In the ORE version I’ve got, the first two lines of the function are

    XMLNode* node = doc.allocNode("CreditDefaultSwapData");
    XMLUtils::appendNode(node, node);

    From what I can tell this is creating the CreditDefaultSwapData node and then assigning it to be its own parent?
    XMLUtils::appendNode(node, node);
    seems like a bug to me, and when I comment it out things seem to work (the assert was failing when it was attempting to assign this CreditDefaultSwapData node to be the child of the Trade node, since the CreditDefaultSwapData was already its own parent).

    I’d appreciate any insight into whether removing the line will produce the desired behavior, or whether I’m missing something.


    • This topic was modified 3 months ago by  coling.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.