Loading...
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 weeks, 5 days ago.

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

    coling
    Participant

    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?
    The
    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.

    Thanks!

    • This topic was modified 3 weeks, 5 days ago by  coling.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.