229
Views
5
Comments
Solved
[XML Records] Structure question
Question
xml-records
Service icon
Forge asset by Afonso Carvalho

Good afternoon, I have used this component previously to convert XML to a record list.  In the past I have mapped every XML element to the corresponding structure and everything worked as expected.   This time I have a fairly large XML but I only need a few tags mapped to an output structure.   Here is an example XML below, in my case I want to create a structure to only map the three fields in red.   

When I try to do this I get an error that the current node does not match the record definition.  (understandable because I didn't map all of the fields in my structure)   Is there any way to accomplish what I'm trying to do?

<IntLayer>
  <NumLookup>
    <FirstName>test</FirstName>
    <LastName>test</LastName>

    <Mbi>abc123</Mbi>
    <Ssn>1234567890</Ssn>
    <MdppInfo>
      <MdppList/>
      <MdppFinancList/>
      <MdppHcpcsList/>
   </MdppInfo>
  </NumLookup>
</IntLayer>

2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

I checked back on this question and I can't upload my OML for some reason. Here's prints of the structure I used:

This processed the XML just fine with XmlToRecordList.

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hi Josh,

I've had to use this in projects where large XML files had to be processed - you're not mandated to map out every field, just the ones you need.

Here's an OML as an example - I've used your XML example but only created a part of the NumLookup structure within IntLayer. You can debug the Preparation for the screen and see that the IntLayer Record List is filled out with data.

XMLAttributes.oml
2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

I checked back on this question and I can't upload my OML for some reason. Here's prints of the structure I used:

This processed the XML just fine with XmlToRecordList.

UserImage.jpg
Josh Herron

Thank you, I will give this a try.   I had my structure set the same way but the IntLayer structure just contained an attribute of type NumLookup structure (not record).

2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Did you manage to process the XML with a reduced structure Josh?

UserImage.jpg
Josh Herron

Afonso Carvalho wrote:

Did you manage to process the XML with a reduced structure Josh?


I did, I just forgot to come back and update this question.   Thank you for the help!

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