Best way to override the XML renderrer of AEM

Avatar

Avatar

RMGJID

Avatar

RMGJID

RMGJID

22-07-2016

We have a requirement where we need to create a XML based on the data authored on the page. After authoring the components on the page, when I say pagename.xml it should generate XML based on our schema. 

I want to check how we can use AEM's default XML renderer to build the XML based on our schema?

I tried adding xml.html in all the components, but that way I need to override the functionality of all the components. For e.g., I'm using parsys to add the components and when I do .xml on a page, the XML will have all the metadata related to parsys component.