[XML Records] Nested attributes in declaration

Forge Component
(34)
Published on 11 Jan by Afonso Carvalho
34 votes
Published on 11 Jan by Afonso Carvalho

Hello, how can I configure this to build XML's from RecordLists with nested attributes like this?


<root>

  <tag1>

    <tag2 attr1="a" attr2="b attr3="c" />

  </tag1>

</root>

Hi Saulo,

You need to do attributes configuration before calling RecordListtoXMl action and pass that as input to parameter XML config.

Hope this helps.

Thanks and Regards,

Suraj Borade

Can I use "AttributesConfig" without specifying a "RecordName"? I've created the entire XML structure of "RecordXMLConfig" but every change I made to the attributes did not reflect on the final XML.


Suraj Borade wrote:

Hi Saulo,

You need to do attributes configuration before calling RecordListtoXMl action and pass that as input to parameter XML config.

Hope this helps.

Thanks and Regards,

Suraj Borade



Sorry to revive this old thread, but I got the same problem. I need to get the values of the attributes "year" and "month" from the node "value". I'm able to get the value in the node "375000".

This is my current status: 

I'm able to get the value of the attribute "type" within the node "historyAdvisedCreditLimit" because this has another node as a child. But for the node "value" I'm not able retrieve the values of the attributes. It fill the "year" and "month" attributes with the value within the node, "375000". 

Is it possible to get the values within the "year" and "month" attributes?

I have tried to use the RecordXMLConfig structure, but this did not work. 

I have filled it as follows (all attributes not mentioned are empty):

{
"RecordXmlConfig": {
      "RecordName": "value",
      "AttributesConfig": [{
               "AttributeXmlConfig": {
                        "Name": "year" }
               },
               {
               "AttributeXmlConfig": {
                        "Name": "month" }
               }
               ]
      }
}


Thanks for any help!

SeabassW wrote:

Sorry to revive this old thread, but I got the same problem. I need to get the values of the attributes "year" and "month" from the node "value". I'm able to get the value in the node "375000".

This is my current status: 

I'm able to get the value of the attribute "type" within the node "historyAdvisedCreditLimit" because this has another node as a child. But for the node "value" I'm not able retrieve the values of the attributes. It fill the "year" and "month" attributes with the value within the node, "375000". 

Is it possible to get the values within the "year" and "month" attributes?

I have tried to use the RecordXMLConfig structure, but this did not work. 

I have filled it as follows (all attributes not mentioned are empty):

{
"RecordXmlConfig": {
      "RecordName": "value",
      "AttributesConfig": [{
               "AttributeXmlConfig": {
                        "Name": "year" }
               },
               {
               "AttributeXmlConfig": {
                        "Name": "month" }
               }
               ]
      }
}


Thanks for any help!

This was a bug that was fixed in 1.6.2. The extension wasn't able to properly fill out attributes within elements. Are you using the latest version?

That solved everything. I am able to map the month and year to the structure. Thanks!