Please note that the FpML website will be down for maintenance from 6-8pm, New York time, on December 7, 2023. For further information email info@fpml.org
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
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”,”bulletPayment”)); cursor.removeAttribute(new QName (“http://www.w3.org/2001/XMLSchema-instance”,”type”)); cursor.dispose(); Hope this helps. Marc http://www.tradeheader.com
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.