
Announcements
Good Afternoon,
I am trying to upload, as a message on a teams group chat, a XML output. Hopefully you can help me and others with this tasks.
XML output anonymized:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE LIST_OUTPUT SYSTEM "https://website.com/list_output.dtd">
<LIST_OUTPUT>
<RESPONSE>
<DATETIME>2023-02-28T14:46:13Z</DATETIME>
<LIST>
<TASK>
<REF>***/**********</REF>
<TYPE>On-Demand</TYPE>
<TITLE><![CDATA[test]]></TITLE>
<USER_LOGIN>*******</USER_LOGIN>
<LAUNCH_DATETIME>2023-02-28T11:17:30Z</LAUNCH_DATETIME>
<DURATION>00:03:10</DURATION>
<PROCESSING_PRIORITY>0 - No Priority</PROCESSING_PRIORITY>
<PROCESSED>1</PROCESSED>
<STATUS>
<STATE>Canceled</STATE>
</STATUS>
<TARGET><![CDATA[123456]]></TARGET>
</TASK>
<TASK>
<REF>***/**********</REF>
<TYPE>On-Demand</TYPE>
<TITLE><![CDATA[test2]]></TITLE>
<USER_LOGIN>*****</USER_LOGIN>
<LAUNCH_DATETIME>2023-02-28T09:10:56Z</LAUNCH_DATETIME>
<DURATION>00:06:05</DURATION>
<PROCESSING_PRIORITY>0 - No Priority</PROCESSING_PRIORITY>
<PROCESSED>1</PROCESSED>
<STATUS>
<STATE>Canceled</STATE>
</STATUS>
<TARGET><![CDATA[12345]></TARGET>
</TASK>
</LIST>
</RESPONSE>
</LIST_OUTPUT>
<!-- A COMMENT //-->Here is the output of this XML on a Teams group chat
2023-02-28T13:14:52Z ***/****** On-Demand **** 2023-02-28T11:11:55Z Pending 0 - No Priority 0 Running
And here is the process on the Flow
I cannot get that output as a JSON format directly from the HTTP request.
Here are the different steps I tried, these steps gave no output (blank message or not even a message on Teams group chat):
string(body('HTTP 4'))xml(body('HTTP 4'))body('HTTP 4')xml(json(body('HTTP 4'))) - failure to be executedxpath('body(HTTP 4'), '/') - I also tried with, //, /LIST_OUTPUT, (/), (//) and (/LIST_OUTPUT) instead of just '/'xpath('xml(body('HTTP 4')), '/') - I also tried with, //, /LIST_OUTPUT, (/), (//) and (/LIST_OUTPUT) instead of just '/'json(body('HTTP 4')) - failure to be executedIn the "Post message in Chat or Channel"'s code view, set the body between: xml body('HTML 4') xml - fails to be approvedHTML to table
I am able to paste that XML into the chat manually without any issues. There are not mentions of such issue in XML related docs for teams or Power Automate. I think I have tried everything accessible to me at this point. Teams' messages are able to display XML, both as text or code format.
My goal is to isolate the title and the target.
I also tried using the format data by examples functionality, but it was unable to provide me an output Regex.
Thank you for your time.