Read a xml file from file system and store as jcr:data in crx | Community
Skip to main content
New Participant
February 26, 2018
Solved

Read a xml file from file system and store as jcr:data in crx

  • February 26, 2018
  • 22 replies
  • 14082 views

Hi,

In AEM, how to read a xml file from file system and store the content as jcr:data into sling:folder node using Java?

Any sample or tutorial available, kindly help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Here is the HELPX article that was created based on this thread -- Scott's Digital Community: Creating a Custom Watched Folder Service for Adobe Experience Manager 6.3

22 replies

smacdonald2008
New Participant
February 26, 2018

I will write sample JCR Java code that shows this. I will post back.

smacdonald2008
New Participant
February 26, 2018

This would be done via a custom service. You can read a file on the desktop using File API. THen you can use the JCR API to create a node under a folder - which is just a JCR location- and then write the content to the node prop using JCR API logic.

To learn how to use JCR API to write data to a node prop - see this -- Scott's Digital Community: Programmatically Accessing Adobe CQ Content using the JCR API