XML element named jcr:root
from the dialog.xml
doesn't create jcr:root
node in the repository. It's a special, reserved identifier and CRX Package Manager puts all properties and subnodes of this element into a node which name is the same as name of the file without extension (in your case it'll be dialog
).
If it's not clear, use CRX DE, open /apps/myProject/pages/myComponent
and see what you can find there. That's why you should add /dialog
rather than /jcr:root
to the end of your path.
If you want to find all dialogs, use the primary type cq:Dialog
, as rakhi4110 suggests. Following query:
/jcr:root/apps/myProject/pages//element(*, cq:Dialog)
will return all dialogs from /apps/myProject/pages
(and descendants).