[XML Records] Struggling with structure

Forge Component
(42)
Published on 25 Nov (13 days ago) by Afonso Carvalho
42 votes
Published on 25 Nov (13 days ago) by Afonso Carvalho

Hi,

I'm using XML records to convert data from an API to a structure. For the 'normal' lines it works fine, but I don't get the permissions to work. Any hints what I am doing wrong?

XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<contactsResponse>
    <contacts>
        <contact>
            <channels>
                <channel name="EMAIL">true</channel>
                <channel name="SMS">false</channel>

            </channels>
            <created>2019-12-02T13:28:53+01:00</created>
            <encryptedId>XXXXXXXXXXXXXXX</encryptedId>
            <externalId>XXXXX</externalId>
            <lastChanged>2019-12-02T13:28:53+01:00</lastChanged>
            <properties>
                <profileField19>XXXX</profileField19>
                <lastName>XXXXXX</lastName>
                <profileField18>XXXXXXXXXXXXXXXXXXXXXXXX</profileField18>
                <organisation>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</organisation>
                <profileField15>XXXXXXX</profileField15>
                <profileField17>XXXXXXXXXXXXXXXXXXXX</profileField17>
                <email>XXXXX@XXXXXXXXXXXXXX.nl</email>
                <initials>X.X.X.</initials>
                <permissions>
                    <entry bit="1" description="Opt-in">true</entry>
                </permissions>
                <gender>F</gender>
                <firstName>XXXX</firstName>
            </properties>
            <temporary>false</temporary>
            <testGroup>false</testGroup>
        </contact>
    </contacts>
</contactsResponse>

Structures:

Solution

Hi Raymond,

I believe you need to map the <entry> tag itself. Right now the structure is named MailPlusGet_entry, and if you do not change its name or add an alias with the AttributesConfig structure, no fields will be mapped to it.

Solution

Hi Afonso,

Changing the name didn't work, since the "MailPlusGet_entry" is a substructure In the parent structure it has the proper name.

 Changing the name "text" to "entry" resulted in the value "true" in that field so I am one step closer to the answer.

Now I only need to get the value "bit" and "description".

 <entry bit="1" description="Opt-in">true</entry>

Hints are welcome ;)


Try prefixing those attributes with "Attr_" - rename bit and description to "Attr_bit" and "Attr_description".

Hi Afonso,

It turns out I made another typo that made it look like changing the name didn't work.

Thanks for your help!