Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to find nodes without specific child node?

Avatar

Level 4

Hello,

Can someone help me with query in CQ?
How can I find nodes without specific child node (e.g. jcr:content)?

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Level 10

You cant do with xpath. Refer [1] published just now to find page that are missing jcr:content.

[1]   http://aemfaq.blogspot.com/2013/12/how-to-find-missing-content-nodes-in.html

View solution in original post

5 Replies

Avatar

Level 8

I am not sure I understand the question. Can you expand on your use case, what kind of nodes are you searching for - components within a page? 

Avatar

Level 4

I have nodes under /content/myapp/en:

/content/myapp/en/jcr:content
/content/myapp/en/item
/content/myapp/en/item/jcr:content
/content/myapp/en/item2
/content/myapp/en/item2/jcr:content
/content/myapp/en/item3
/content/myapp/en/item4

I want to write xpath query to find nodes without jcr:content.
As result I want to see:
/content/myapp/en/item3
/content/myapp/en/item4

Avatar

Level 10

Why not use JCR-SQL? 

Avatar

Correct answer by
Level 10

You cant do with xpath. Refer [1] published just now to find page that are missing jcr:content.

[1]   http://aemfaq.blogspot.com/2013/12/how-to-find-missing-content-nodes-in.html

Avatar

Level 4

It doesn't matter. Could you show please, how to do it using JCR-SQL?