简体   繁体   English

adobe体验管理器如何将XML内容呈现到网页中?

[英]How does adobe experience manager render XML content into a webpage?

I'm quite a newbie in AEM(Adobe experience manager), but I heard that you can export XML from it. 我是AEM(Adobe体验经理)的新手,但我听说你可以从中导出XML。 I have 3 questions regarding this: 我有3个问题:

  • Why not HTML? 为什么不用HTML?
  • How does AEM process internally to display the XML content? AEM如何在内部处理以显示XML内容?
  • How do we render the XML content outside AEM to see the original webpage content in AEM? 我们如何在AEM外部呈现XML内容以查看AEM中的原始网页内容?

Thank you very much and hope to hear back from you soon! 非常感谢您,希望尽快收到您的回复!

Out of the box, AEM can render content in XML and HTML, as well as JSON and others. 开箱即用,AEM可以使用XML和HTML以及JSON等呈现内容。 See this similar question . 看到这个类似的问题

You'll want to read the Sling Cheatsheet and the Sling docs regarding Apache Sling script resolution. 您将要阅读有关Apache Sling脚本解析的Sling CheatsheetSling文档 Read about Sling rendering with the default Get servlet . 阅读使用默认Get servlet的Sling渲染

The same content in the JCR can be rendered in different formats by changing the URL extension. 通过更改URL扩展,可以以不同的格式呈现JCR中的相同内容。 So if you have a cq:Page resource at /content/projectname/page , you can retrieve XML by making a simple GET request to /content/projectname/page.xml . 因此,如果在/content/projectname/pagecq:Page资源,则可以通过向/content/projectname/page.xml发出简单的GET请求来检索XML。 Likewise you can retrieve HTML at /content/projectname/page.html and JSON at /content/projectname/page.json . 同样,你可以检索在HTML /content/projectname/page.html在和JSON /content/projectname/page.json

As for your question on how AEM renders handles the rendering internally, it's actually the responsibility of Apache Sling. 至于你关于AEM渲染如何在内部处理渲染的问题,它实际上是Apache Sling的责任。 You can examine the open source code on GitHub including the different renderers . 您可以检查GitHub上的开源代码,包括不同的渲染器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM