Generate XML using Sightly | Community
Skip to main content
Level 2
October 16, 2015
Solved

Generate XML using Sightly

  • October 16, 2015
  • 1 reply
  • 591 views

Hi,

I would like to use Sightly to generate XML and properly XML escape the text. So what I would like to do is

<myTag>${properties.text @context='xml'}</myTag>

but this does not seem to be possible.

I have seen that in Sightly one has access to some Java backed objects like 'xssAPI'. So now I would like to use the method xssAPI.encodeForXML but I do not see how I could call this method in Sightly.

Any help how to do xml escaping in sightly is appreciated.

Thanks,
Ronald

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

With Slighty - you can pass operations to Java. You can easily create XML using Java and various Java APIs like W3C APIs. To learn how to work with Sighty and Java, see:

http://helpx.adobe.com/experience-manager/using/creating-sightly-component.html

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

With Slighty - you can pass operations to Java. You can easily create XML using Java and various Java APIs like W3C APIs. To learn how to work with Sighty and Java, see:

http://helpx.adobe.com/experience-manager/using/creating-sightly-component.html