Forums

FpML Discussion

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2033
    j_hughez
    Spectator

    Ive created a simple message using XMLBeans. However for the product tag Im getting < product xsi:type="rec:FxSingleLeg" xmlns:rec="http://www.fpml.org/FpML-5/recordkeeping" > instead of just < fxSingleLeg > as I would have expected. Would anyone be able to shed any light on how to correct this? Thanks J

    #2034
    mgratacos
    Keymaster

    Hello, XMLBeans supports XML Schema substitution groups but it is not very clean. An example using the FpML product bulletPayment: BulletPayment bp = BulletPayment.Factory.newInstance(); … [building the whole product structure]… trade.setProduct(bp); XmlCursor cursor = trade.getProduct().newCursor(); cursor.setName(new QName(“http://www.fpml.org/FpML-5/confirmation&#8221;,”bulletPayment”)); cursor.removeAttribute(new QName (“http://www.w3.org/2001/XMLSchema-instance&#8221;,”type”)); cursor.dispose(); Hope this helps. Marc http://www.tradeheader.com

    #2036
    j_hughez
    Spectator

    Thank you so much. That is a big help. The tag is now < fxSingleLeg xmlns:rec="http://www.fpml.org/FpML-5/recordkeeping" >One more question. Do you know if it is possible to remove the xmlns:rec=http://www.fpml.org/FpML-5/recordkeeping bit. Thanks Again for all your help. J.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.