Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
can you tell me how to manage subloops in xml ?
I am playing with tExtractXMLField and tXMLMap for hours but I did not succeed to extract data correctly from XML root :
"/GetOccurrencesResponse/GetOccurrencesResult/Occurrence"
I have a first part with ; /DataFields/DataField having attributes ; - ControlType -DataType -DisplayLabel -ElementIdentifier -Name -Value
And a second part with attributes - ID - IncidentId - Incident number ...
here is my xml :
<?xml version="1.0" encoding="ISO-8859-15"?> -<root> -<row> <Header/> <Body><GetOccurrencesResponse xmlns="http://www.abc.com/abcWebServices/v1.2/"><GetOccurrencesResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Occurrence><Attachments /><BrokenRules />
<DataFields>
<DataField><ControlType>TextEdit</ControlType><DataType>Numeric</DataType> <DisplayLabel>Flight ID</DisplayLabel><ElementIdentifier>Ffbf9ece5ad0c47c592cf676de2f860e2</ElementIdentifier><Name>IdFlight_ergoss</Name><ReferenceListName /><Value>1</Value></DataField>
<DataField><ControlType>TextEdit</ControlType><DataType>String</DataType> <DisplayLabel>Registration</DisplayLabel><ElementIdentifier>Fa82246081ab74cf48a2a1f0af5aef4ec</ElementIdentifier><Name>Registration_ergoss</Name><ReferenceListName /><Value>test registration</Value></DataField>
</DataFields>
<ID>8641</ID> <IncidentId>-1</IncidentId> <IncidentNumber /> <IncidentStatusName /> <IncidentTitle /> <IsMain>true</IsMain> <LocationName /><Notes /> <Number>FDM-137</Number> <RecordedByPersonName>SARA, ERGOSS</RecordedByPersonName> <RecordedDate>2020-02-05T14:05:56.763</RecordedDate> <ReportTypeName>ERGOSS</ReportTypeName> <ReportedByPersonName>User, API</ReportedByPersonName> <ReportedDate>2020-02-05T13:05:00</ReportedDate> <Title>Title4Test</Title> </Occurrence><Occurrence><Attachments /><BrokenRules />
<DataFields>
<DataField><ControlType>TextEdit</ControlType><DataType>Numeric</DataType> <DisplayLabel>Flight ID</DisplayLabel><ElementIdentifier>Ffbf9ece5ad0c47c592cf676de2f860e2</ElementIdentifier><Name>IdFlight_ergoss</Name><ReferenceListName /><Value>1</Value></DataField>
<DataField><ControlType>TextEdit</ControlType><DataType>String</DataType> <DisplayLabel>Registration</DisplayLabel><ElementIdentifier>Fa82246081ab74cf48a2a1f0af5aef4ec</ElementIdentifier><Name>Registration_ergoss</Name><ReferenceListName /><Value>test registration</Value></DataField>
</DataFields>
<ID>8642</ID> <IncidentId>-1</IncidentId> <IncidentNumber /> <IncidentStatusName /> <IncidentTitle /> <IsMain>true</IsMain> <LocationName /> <Notes /> <Number>FDM-138</Number> <RecordedByPersonName>SARA, ERGOSS</RecordedByPersonName> <RecordedDate>2020-02-05T14:12:07.407</RecordedDate> <ReportTypeName>ERGOSS</ReportTypeName> <ReportedByPersonName>User, API</ReportedByPersonName> <ReportedDate>2020-02-05T13:12:00</ReportedDate> <Title>Title4Test</Title> </Occurrence><Occurrence><Attachments /><BrokenRules /> <Fault/> </row> </root>
...
Here is a another full structure of my xml file for 1 occurence in input ... can someone explain how to define my xml extract component and xml metadata to be able to read such file ?
Thank's in advance for your help.
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetOccurrenceResponse xmlns="http://www.fakeabc.com/fakeabcWebServices/v1.2/">
<GetOccurrenceResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Attachments/>
<BrokenRules/>
<DataFields>
<DataField>
<ControlType>CheckEdit</ControlType>
<DataType>Boolean</DataType>
<DisplayLabel>Voluntary Report</DisplayLabel>
<ElementIdentifier>
DamienBlondel,
Recently i have worked considerably on xml data sources and was able to loop through the data sources. All you have to ensure here is adding the looping construct at the right place. i can probably help you if i understand your question correctly. Can you please rephrase your question and precisely ask what the problem is.
hello and thank you for your reply.
I am not able to read this complex (for me) xml structure ...
<GetOccurrencesResponse xmlns="http://www.ffff">
<GetOccurrencesResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Occurrence>
<Attachments />
<BrokenRules />
<DataFields>
<DataField>
<ControlType>CheckEdit</ControlType>
<DataType>Boolean</DataType>
<DisplayLabel>Voluntary Report</DisplayLabel>
<ElementIdentifier>F712f969fc0c7438ca4b306894930731e</ElementIdentifier>
<Name>Voluntary Report</Name>
<ReferenceListName />
<Value>false</Value>
</DataField>
<DataField>
… repeated several times
</DataField>
…
</DataFields>
<ID>8872</ID> <=== these is the key of the occurence
<IncidentId>-1</IncidentId>
<IncidentNumber />
<IncidentStatusName />
<IncidentTitle />
<IsConfidential>true</IsConfidential>
<LocationName>NAP</LocationName>
<Notes />
<Number>ASR-4610</Number>
<RecordedByPersonName>GASINI, Claudio</RecordedByPersonName>
<RecordedDate>2020-02-25T14:56:04.59</RecordedDate>
<ReportTypeName>Air Safety Report</ReportTypeName>
<ReportedByPersonName>DBL LUFO, Stéphane</ReportedByPersonName>
<ReportedDate>2020-02-23T00:00:00</ReportedDate>
<Title />
</Occurrence>
<Occurrence>
… many other occurences
</Occurrence>
</GetOccurrencesResult>
</GetOccurrencesResponse>
I hope it’s clearer … you can see that for each OCCURRENCE, I have 2 blocks
Can upload xml file.
If i am understanding your problem correctly, you are facing problems in capturing data elements that are repeating with in parent node...if that is what you are looking for then the attached image should give you a fair deal of understanding on how to achieve this. You have to tag a repeating element as a loop element both at the source and target levels with in a tXMLMap component.
If my understanding about your problem is not correct, please repeat what the problem is, I can attempt to provide a solution to your problem.
Does this solve your issue..?
Bonjour,
sorry for late answer. My question is about having a double loop in the same tree.
When I import my file in input, I can see 1 loop only.
Do you know where I can define a double loop ?
regards
Damien