Can you double check what node type is your "it-works" node? I could not see 
anywhere details on how you create it, except for saying you use it in the tests
the [code]hm.getContent("it-works")[/code] method returns any type of content. 
the query results on the other hand by default filter result set to 
mgnl:content so if your test node is of a different type you will not see it 
unless you specify the node type of the result so be something else.

Simple test: go to website, create new page and name it "it-works". Then still 
in AdminCentral go to Tools/JCRQueries and execute following query against 
website repository:
[code]select * from nt:base where jcr:path = '/it-works'[/code]

on the right side of the page you will see your result. 
as for the xpath query, the query will be like the others outlined above either 
[code]//it-works[/code] or [code]/jcr:root/it-works[/code], but still you need 
to make sure that either the it-works node is of mgnl:content node type or you 
need to explicitly specify its node type when obtaining content from the 
QueryResult.

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=803af20d-bbd4-4890-8697-481935abfce3


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to