Outbound XML file



I am creating an outbound XML file using business functions 'B0000201- XERCES wrapper'. Everything works well and i have XML file ready.
But i want to add attribute to one of the XML tag in the file, not the root element, but some sub element. I tried to use BSFN 'B0000201 - Add XML Attribute XERCES Wrapper', but it did not work.
For e.g. I have a file
<Age> 26</Age>
<Amount Ccy = "EUR">100.50</Amount>

I want to add 'Ccy' attribute to the tag <Amount>, but it is not working. I have used below functions

1. Create XML Document Xerces Wrapper -B0000201 - Create idRootHandle_GENLNG and document element idDocumentElement_GENLNG
2. Create customer tag. not explaining here.
3. Add XML Element String Xerces Wrapper - B0000201 - Create Transaction group. Free element flag = 0, return pointer idTransactionGroup_GENLNG
4. Add XML Element Math Numeric Xerces Wrapper - B0000201 - Create Amount element, free Element Flag = 1, Return pointer idAmount_GENLNG
5. Add XML Attribute Xerces Wrapper - B0000201 -
idRootHandle_GENLNG -> hXMLDocument

But this creates

It doesn't add attribute to it.

Please help.

Hi Priya,

Pass 0 -> BF cFreeElementFlag. It will work
Add XML Element Math Numeric Xerces Wrapper
<Zero> -> BF cFreeElementFlag

Thanks Imran for your help. I had created a custom BSFN for this while I was waiting for reply and that worked. But after your post, I used the standard ones and it is working :)