[XML Records] problems with deserializing XML file

[XML Records] problems with deserializing XML file

  
Forge Component
(24)
Published on 15 Jun by Ricardo Silva
24 votes
Published on 15 Jun by Ricardo Silva
 
Hi,
 
Can somebody help me out with de next XML Records loading problem. I have this XML file
 
<?xml version="1.0" encoding="utf-8"?>
<message>
  <clients>
    <client>
      <username>JohnD</username>
      <firstname>John</firstname>
      <lastname>Doe</lastname>
      <addresses>
        <address>
          <street>Wallstreet</street>
          <number>34</number>
          <zipcode>33695</zipcode>
        </address>
        <address>
          <street>Vermont Ave</street>
          <number>564</number>
          <zipcode>97883</zipcode>
        </address>
      </addresses>
      <Partner>
        <firstname>Mary</firstname>
        <lastname>McDonald</lastname>
      </Partner>
    </client>
  </clients>
</message>
 
I want load this file in memory in outsystems. Therefore I created the next structures:
 
Message
- clients - Record List of Client structure
 
Client
-username - text
-firstname - text
-lastname - text
-addresses - Record List of Address structure
-partner - Partner structure
 
Address
-street - text
-number - text
-zipcode - text
 
Partner
-firstname - text
-lastname -text
 
The "Message" and "Clients" are deserialized well but the partner is not loaded into memory. I use the "XmltoRecordList" 
component with the DefaultConfig set to the default values. Why does the "XmlToRecordList" load the record list of Client" 
and the record list of "Address" but does not load the single node "Partner" into the memory. I need some help with this.

thanks
Hi Peerke
Try changing the name of your partner attribute in the Client structure to Partner (capital P). XML is case sensitive.
Let us know if that worked...
Thank you for the quick reply. I found the problem. The Partner attribute in the Client structure was of data type "Partner" structure. The data type of the Partner attribute had to be of "Record" data type with the record definition "Partner". This solved the problem and the XML structure deserialized now completely