I'm using a REST call to retrieve the XML-response from
https://soap.e-boekhouden.nl/soap.asmx? ... rekeningen
The tables are created using : https://soap.e-boekhouden.nl/soap.asmx?WSDL
The XML-response is like :
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetGrootboekrekeningenResponse xmlns="http://www.e-boekhouden.nl/soap">
<GetGrootboekrekeningenResult>
<ErrorMsg />
<Rekeningen>
<cGrootboekrekening>
<ID>34318076</ID>
<Code>1410</Code>
<Omschrijving>Privé-opnamen en stortingen</Omschrijving>
<Categorie>BAL</Categorie>
<Groep />
</cGrootboekrekening>
<cGrootboekrekening>
<ID>34318081</ID>
<Code>0130</Code>
<Omschrijving>Inventarissen</Omschrijving>
<Categorie>BAL</Categorie>
<Groep />
</cGrootboekrekening>
</Rekeningen>
</GetGrootboekrekeningenResult>
</GetGrootboekrekeningenResponse>
</soap:Body>
</soap:Envelope>
There are 4 "levels" :
GetGrootboekrekeningenResponse (1)
- GetGrootboekrekeningenResult (2)
- ErrorMsg
- Rekeningen (3)
- cGrootboekrekening (4)
- Categorie
- Code
- Groep
- ID
- Omschrijving
After a request the XML-response is NOT stored in the 4 underlying tables.
Questions :
- Should it work if there are 4 levels ?
- Otherwise, how to extract a single field with XML-response to tables ?
- Is it possible to use PARSE_XML (object, '//string') to extract data from an array ?
- Do I have to write an external (Python) program to extract the XML-response ?
Extract XML-output (from API-request) to multible tables
Re: Extract XML-output (from API-request) to multible tables
What version of AwareIM are you using?
Bob
Re: Extract XML-output (from API-request) to multible tables
Hi Jannes,
Perhaps there is an easier way, but if you can store the XML response in a text attribute, you can always retrieve any value using PARSE_XML with the correct XPath expression, no matter how many levels deep.
Perhaps there is an easier way, but if you can store the XML response in a text attribute, you can always retrieve any value using PARSE_XML with the correct XPath expression, no matter how many levels deep.
Niels
(V9.0 build 3272 - MariaDB - Windows)
(V9.0 build 3272 - MariaDB - Windows)