コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

What APIs should be used to create a XML file in AEM?

Avatar

Level 2

We create a AEM pages using PageManager class. Like this I want to create a XML file dynamically and store in DAM location. Can anyone tell me what API should be used to create a XML files in AEM?

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

Hi,

You need to use Asset API

 

 com.day.cq.dam.api.AssetManager assetMgr = resourceResolver.adaptTo(com.day.cq.dam.api.AssetManager.class);
assetMgr.createAsset(<attachmentPath>, <input stream>,<contentType>, true);
 
 for XML files, contentype = 'application/xml'

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/upload-assets-to-aem-using...

 

Arun Patidar

AEM LinksLinkedIn

元の投稿で解決策を見る

2 返信

Avatar

正解者
Community Advisor

Hi,

You need to use Asset API

 

 com.day.cq.dam.api.AssetManager assetMgr = resourceResolver.adaptTo(com.day.cq.dam.api.AssetManager.class);
assetMgr.createAsset(<attachmentPath>, <input stream>,<contentType>, true);
 
 for XML files, contentype = 'application/xml'

 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/upload-assets-to-aem-using...

 

Arun Patidar

AEM LinksLinkedIn

Avatar

Level 2

Thank you Arun_Patidar