Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IN
Last activity: 9 Nov 2017 13:23 EST
How to form xml in activity?
Hi Team,
I have a pagelist , i have to iterate on it and form xml for each page . Can you please help?
Regards
Pavani
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Truviq Systems Private Limited
IN
Hi Pavani,
You can use the function getXMLOfPage as below in activity and save it to a Param value.
Hope this helps !
Thanks,
Srikanth Y.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
Pegasystems Inc.
US
Hi Pavani,
You can use getXML method to get the xml string from the clipboardpage as follows:
ClipboardPage cp = tools.findPage("PageListPage");
String xml = cp.getXML(.pxResults);
This way you can get the xml for the page list or you can also try to get the xml string for each page.
Regards
Mahesh
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
Pegasystems Inc.
US
If you want to get the xml string for individual pages by iterating then you can just call getXML() on the clipboardpage.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IN
Can we use stream xml ?
property set xml method
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/1689979000/321c2db9-adc7-4c43-8f1d-d6a84c486e5a.jpg?itok=mEyE0RUn)
Pegasystems Inc.
US
Yes, you can also use xml stream rule with property-set-xml method.
Reference : https://community.pega.com/how-create-xml-document-using-xml-stream-rules
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IN
I actually want to loop and convert each pxresult into xml can u please give me in detail steps to achieve this.
Accepted Solution
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Truviq Systems Private Limited
IN
Hi Pavani,
You can use the function getXMLOfPage as below in activity and save it to a Param value.
Hope this helps !
Thanks,
Srikanth Y.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
IN
Thanks a Lot srikanth it helped