Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
HeenaMadan
HeenaMadanAccepted solution
Community Advisor
September 11, 2022

Use querybuilder to find all pages tagged with specific tags. For eg: to find all pages tagged with "we-retail:apparel/pants"

path=/content/we-retail
type=cq:Page
property=jcr:content/@cq:tags
property.value=we-retail:apparel/pants
p.limit=-1

Refer https://sourcedcode.com/blog/aem/find-all-aem-pages-with-tags-with-query-builder

You need to write custom sling model exporter to return response in xml format. You can use javax.xml.bind.JAXBElement

Refer https://github.com/aemgeeks1212/aemgeeks/blob/master/core/src/main/java/com/aem/geeks/core/models/impl/XmlExporterImpl.java

https://github.com/aemgeeks1212/aemgeeks/blob/master/core/src/main/java/com/aem/geeks/core/exporter/GeeksXmlExporter.java and customize as per your requirement.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/adobe-cq-export-content-as-xml/td-p/228129

Or you can write servlet and return response to xml format.

2 replies

HeenaMadan
Community Advisor
HeenaMadanCommunity AdvisorAccepted solution
Community Advisor
September 11, 2022

Use querybuilder to find all pages tagged with specific tags. For eg: to find all pages tagged with "we-retail:apparel/pants"

path=/content/we-retail
type=cq:Page
property=jcr:content/@cq:tags
property.value=we-retail:apparel/pants
p.limit=-1

Refer https://sourcedcode.com/blog/aem/find-all-aem-pages-with-tags-with-query-builder

You need to write custom sling model exporter to return response in xml format. You can use javax.xml.bind.JAXBElement

Refer https://github.com/aemgeeks1212/aemgeeks/blob/master/core/src/main/java/com/aem/geeks/core/models/impl/XmlExporterImpl.java

https://github.com/aemgeeks1212/aemgeeks/blob/master/core/src/main/java/com/aem/geeks/core/exporter/GeeksXmlExporter.java and customize as per your requirement.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/adobe-cq-export-content-as-xml/td-p/228129

Or you can write servlet and return response to xml format.

Translate