[XML Records] The current node (Nav_Salary) does not match the record definition (NAV_Salary)
Question
xml-records
Service icon
Forge component by Afonso Carvalho
Application Type
Service

I'm trying to use XMLToRecordList in the XML Records component.  I'm trying to convert this xml to Record:

<NAV_Salary><NAV_TaxCardRate>100</NAV_TaxCardRate><NAV_TaxCardUsedToDate>05/01/22</NAV_TaxCardUsedToDate><NAV_SpouseTaxCardRate>0</NAV_SpouseTaxCardRate><NAV_OtherTaxBase>0</NAV_OtherTaxBase><NAV_UnusedTaxAmount>0</NAV_UnusedTaxAmount></NAV_Salary>

The Structure and the varible I'm trying to load into is like this:


I keep getting the above Error:   The current node (Nav_Salary) does not match the record definition (NAV_Salary)



Any Ideas what could be causing this?  I see that Nav_Salary is with a and v in small letters but in Capital letters in the record definition.  If that is causing the problem how to solve that!?

I have tried to fill out the XmlConfig but I'm not sure that I'm on the right track there....

This was solved by string replacement!  I'm not sure if that is how I should do it but this did the trix: 

Replace(Replace(varXMLRetValEmployee, "<NAV_Salary>", "<RecordList><NAV_Salary>"), "</NAV_Salary>", "</NAV_Salary></RecordList>")

Where the varXMLRetValEmployee contains the XML that the SOAP service returns and by adding the RecordList node in front (and after) of what the SOAP service retuns it matches the Variable used to store the new record.

Hope there is a better way to do this, but my english and understanding of the XMLConfig of the XmlToRecordList object is not that good, so I went this way!

mvp_badge
MVP

Hello Viktor,

I'm glad you were able to solve this. Reading on your issue, I'm still not sure what went wrong - this sort of record definition mismatches are usually caused by defining your record in a different manner from the XML, but this looks correct at a glance.

Would you consider sharing your module so I can look into this?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.