Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Exact difference between Jcr-xql2, xpath query and query builder api

Avatar

Level 2

Hi All,

Can you let me know the differences between Jcr-xql2, xpath query and query builder api .

Which is the best in among three to query the crx3.

Can you share me the official documentation links to these please?

Thanks in advance.

---

Regards,

Pavan Bukka

1 Accepted Solution

Avatar

Correct answer by
Level 10

QUeryBuilder is built upon JCR SQL API. See: Query Builder API

You can use the QueryBuilder API within a custom AEM service and invoke it from an backend Java  HTL component (then display the result set in the HTL front end) -- see: Scott's Digital Community: Creating an AEM HTL component that queries the JCR

JCR SQL/2 docs can be found here: JCR 2.0: 6 Query (Content Repository for Java Technology API v2.0)

Community docs: 9 JCR-SQL2 Queries Every AEM Developer Should Know | 6D Labs

Another good community doc: http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/aem-query-builder/

As far as XPATH  - in later versions of AEM - this is not used much. Use ether QueryBuilder API or JCR SQL2.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

QUeryBuilder is built upon JCR SQL API. See: Query Builder API

You can use the QueryBuilder API within a custom AEM service and invoke it from an backend Java  HTL component (then display the result set in the HTL front end) -- see: Scott's Digital Community: Creating an AEM HTL component that queries the JCR

JCR SQL/2 docs can be found here: JCR 2.0: 6 Query (Content Repository for Java Technology API v2.0)

Community docs: 9 JCR-SQL2 Queries Every AEM Developer Should Know | 6D Labs

Another good community doc: http://www.aemcq5tutorials.com/tutorials/adobe-aem-cq5-tutorials/aem-query-builder/

As far as XPATH  - in later versions of AEM - this is not used much. Use ether QueryBuilder API or JCR SQL2.