Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a list of xml files(229 files)
i want to parse this xml and insert into my data base.
this is my job:
the problem that i can't get the data from the the xml file.
my xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
-<root>
-<row>
<statusCode>200</statusCode>
<body/>
<string><?xml version="1.0" encoding="UTF-8"?> <properties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="https://multicodes.giatamedia.com/xsd/1.0/properties.xsd" country="FK" lastUpdate="2020-03-03"><property giataId="619052" lastUpdate="2020-03-02T02:10:22+01:00" xlink:href="https://multicodes.giatamedia.com/webservice/rest/1.0/properties/619052"/><property giataId="877771" lastUpdate="2020-03-01T02:08:53+01:00" xlink:href="https://multicodes.giatamedia.com/webservice/rest/1.0/properties/877771"/><property giataId="936204" lastUpdate="2020-03-03T02:27:43+01:00" xlink:href="https://multicodes.giatamedia.com/webservice/rest/1.0/properties/936204"/></properties></string>
</row>
</root>
any help please!!
First of all: This is not a valid xml content. You have a pragma<?xml version="1.0" encoding="UTF-8"?> just within the document.
You need to extract the content of the tag string first as its own xml file.
Another solution could be to remove the pragma (<xml?...>) with a simple text replacement and than you can parse the xml:
The loop path should be
/string/properties
and the schema columns can be addressed by e.g.
./@giataId