AEM - html page source code is XML or json ?

Avatar

Avatar
Validate 10
Level 2
arunk85184451
Level 2

Likes

4 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 3
View profile

Avatar
Validate 10
Level 2
arunk85184451
Level 2

Likes

4 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 3
View profile
arunk85184451
Level 2

02-03-2020

Hello,

 

in AEM ,html pages are in json format . i think yes ?

 

any html page created in AEM , Like test.html can be viewed as .test.model.json ? how we can see as xml format ?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

645 likes

Total Posts

606 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

02-03-2020

@arunk85184451,

The new AEM Core WCM Components are built with Sling Models, which Sling Models includes a single exporter, using the Jackson framework. Jackson allows you to expose and format Sling Model Object's properties in JSON format. 

There's another way to obtain JSON from any resource and AEM. You can replace ".html" with "tidy.infinity.json"; which the request triggers the default Sling GET servlet in JSON mode. read more here: https://sling.apache.org/documentation/bundles/rendering-content-default-get-servlets.html

Visit this thread of Adobe's Forum topic to review a conversation about converting content as XML: https://experienceleaguecommunities.adobe.com/t5/Adobe-Experience-Manager/Adobe-CQ-Export-Content-As...

Hope this helps,

Brian.

Answers (2)

Answers (2)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,314 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

03-03-2020

If xml rendering is not blocked from dispatcher you can view xml response of page using xml extension.

Example - 

http://localhost:4502/content/MyApp/en.xml 

Avatar

Avatar
Validate 10
Level 2
arunk85184451
Level 2

Likes

4 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 3
View profile

Avatar
Validate 10
Level 2
arunk85184451
Level 2

Likes

4 likes

Total Posts

43 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 1
Give Back
Boost 3
View profile
arunk85184451
Level 2

02-03-2020

thanks for your help