Export pyworkPage data as XML and download from browser as .xml file

Need to export pyWorkPage data as XML and download from browser as .xml/text file. Any Suggestions.

Please find the below articles which might be helpful.

https://collaborate.pega.com/question/create-raw-xml-clipboard-page

https://collaborate.pega.com/question/how-create-xml-file-and-move-created-file-one-destination

Issue was with xml file opening in new window instead of getting downloaded. Able to resolve the same by adding java step.

@AkankshaU what was the java step used.

Could you please paste it here for everybody to know and use.

@AkankshaU Hi, can you provide the Java code used to resolve this? I am looking to accomplish the same thing. Thank you.

@SamuelE2 You can refer pzShowXMLofPage and pyDownloadLog OOTB activities and prepare the code according to your requirement.

I no longer have access to the code i prepared.