Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Miguel Morujão
16
Views
5
Comments
XMLRecord current node does not match the recordf definition
Question
Forge
Hey, i'm trying to parse XML Files using the XmlRecords extension but i'm having problems finding the right structure to hold the records. I'm using the action "XmlToRecordList".
Here's a sample of the xml:
<?xml version="1.0" encoding="utf-16"?>
<CurrentWeather>
<Location>Lisboa / Portela, Portugal (LPPT) 38-46N 009-08W 123M</Location>
<Time>Mar 16, 2015 - 10:30 AM EDT / 2015.03.16 1430 UTC</Time>
<Wind> Variable at 3 MPH (3 KT):0</Wind>
<Visibility> greater than 7 mile(s):0</Visibility>
<SkyConditions> mostly clear</SkyConditions>
<Temperature> 60 F (16 C)</Temperature>
<DewPoint> 39 F (4 C)</DewPoint>
<RelativeHumidity> 44%</RelativeHumidity>
<Pressure> 29.97 in. Hg (1015 hPa)</Pressure>
<Status>Success</Status>
</CurrentWeather>
I created a Structure named "Weather" thats has a atribute "CurrentWeather" that has the type "CurrentWeather" wich is also a structure that has all the fields like "Location", "Time", "Wind", "Visibility", etc....
Weather:
-CurrentWeather
CurrentWeather:
-Location
-Time
-Wind
-Visibility
-SkyConditions
-Temperature
-DewPoint
-RelativeHumidity
-Pressure
-Status
(all text)
And i'm having the following error:
The current node (CurrentWeather) does not match the record definition (rrentWeather)
It's kinda strange because in the error there are always two letters missing in the record definition name.
Anyhelp would be appreciated.
Ricardo Silva
What version of the OutSystems Platform are you using?
Can you provide an eSpace with the issue?
Are you running on .NET or Java ?
Miguel Morujão
Well i already solved the problem by placing two letter before like aaCurrentWeather. Lol for some reason he is ignoring the two first letters.
Ricardo Silva
Hello Miguel,
I would still like an answer to the questions I asked so I can better test this.
Since XML records uses reflection and relies heavily on the naming conventions of the generated code, this could mean that there was some change in it.
Can you please let me know the answers to the questions I made?
1 reply
20 Mar 2015
Show thread
Hide thread
Miguel Morujão
Ricardo Silva
wrote:
Hello Miguel,
I would still like an answer to the questions I asked so I can better test this.
Since XML records uses reflection and relies heavily on the naming conventions of the generated code, this could mean that there was some change in it.
Can you please let me know the answers to the questions I made?
-.Net
-Version 9.0.0.36
-eSpace attached
Bookings_v190.oml
Pedro Coelho
MVP
I had the same problem and solved it (when using the XMLToRecordList action) by correcting the structure I was using, e.g., Record List of <entity> instead of List of <Entity>
In your case you should have a Weather Record List instead of Weather List
Hope it helps
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...