Hello, I can't solved problem with my flow to parse XML to JSON. I get HTTP POST response in XML format like this:
<?xml version="1.0" encoding="utf-8"?>
<databases_response>
<status>200</status>
<message>The request has been successfully processed</message>
<data>
<row id="1">
<column id="87828">BL848SS</column>
<column id="87829">PG307385</column>
<column id="87830">28.5.2018</column>
<column id="87831">13.10.2020</column>
<column id="87832">1590</column>
<column id="87833">86</column>
<column id="87834">BENZIN</column>
<column id="87835">ÄŒervená metalÃza</column>
<column id="87836">5</column>
<column id="87837">1335</column>
<column id="87838">1870</column>
<column id="87839">2</column>
</row>
</data>
</databases_response>
I used xpath in my flow to get only <row></row> from response and after that transform with JSON function to JSON. Power Automate generated this schema to parse JSON:
{
"type": "object",
"properties": {
"row": {
"type": "object",
"properties": {
"@@id": {
"type": "string"
},
"column": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@id": {
"type": "string"
},
"#text": {
"type": "string"
}
},
"required": [
"@@id",
"#text"
]
}
}
}
}
}
}
However I don't get values from <column id=xxxx> from original XML response. I think the problem is to every value hasn't got original tag, but the same use only with id=xxxxx. Is it possible to change tags <column id=> to another for example with xpath. Or create other JSON schema and parse values from <column id=xxxxx> correctly?
Thanks a lot.

Report
All responses (
Answers (