2011年3月28日 星期一

json query jcr data in sling

http://localhost:8080/content.query.json?queryType=xpath&statement=//*[jcr:contains(.,'sling')]/(rep:excerpt(.))

result:

[{"name":"forum","jcr:path":"/content/forum","rep:excerpt()":"
Scala for Sling<\/strong><\/span><\/div>","jcr:score":2257},{"name":"scala4sling","jcr:path":"/content/forum/scala4sling","rep:excerpt()":"
Sling<\/strong>. We use its DSL capability and support for XML literals to create type ...<\/span><\/div>","jcr:score":564},{"name":"sling","jcr:path":"/content/forum/sling","rep:excerpt()":"
Sling<\/strong> Apache Sling<\/strong> is an innovative web framework that is intended to bring back the fun to ...<\/span><\/div>","jcr:score":997},{"name":"jcr:content","jcr:path":"/var/classes/forum/searchArgs.class/jcr:content","rep:excerpt()":"
... currentSession;\n private org.apache.sling.scripting.core.ScriptHelper sling<\/strong>;\n private Object currentNode;\n private java.io.BufferedReader<\/span>... public org.apache.sling.scripting.core.ScriptHelper sling<\/strong>();\n public Object currentNode();\n public javax.jcr.Node ...<\/span><\/div>","jcr:score":499},{"name":"jcr:content","jcr:path":"/sling-test/sling/sling-test.html/jcr:content","rep:excerpt()":"
admin Sling<\/strong> client library test page\n\nAutomated Sling<\/strong> client library tests\n\nLoading this page executes some simple automated<\/span>\n\nMore info\n\nAfter running the tests at least once, /sling<\/strong>-test/testhtml-nodes.json\nshould show the JSON data of the nodes created ...<\/span><\/div>","jcr:score":846},{"name":"jcr:content","jcr:path":"/signup.html/jcr:content","rep:excerpt()":"
admin Sign Up to the Sling<\/strong> Launchpad\n \n \n \n \n \n <\/span>... \n\n \n \n \n \n \n \n Create a new accont in the Sling<\/strong> Launchpad\n\n \n \n We are sorry! This functionality ...<\/span><\/div>","jcr:score":1197},{"name":"jcr:content","jcr:path":"/i.html/jcr:content","rep:excerpt()":"
... ??? | Logout\n \n\n \n \n \n \n Welcome to the Sling<\/strong> Launchpad\n\n \n \n Apache Sling<\/strong> is a web framework that uses a Java Content Repository, \n such<\/span> \n\n \n The Sling<\/strong> Launchpad is a ready-to-run Sling<\/strong> configuration, providing an embedded \n JCR content repository<\/span>... our \n \n mailing lists\n to contact the Sling<\/strong> developers team.\n \n \n \n The Sling<\/strong> OSGi management console is available at system/console,\n use ...<\/span><\/div>","jcr:score":1018},{"name":"jcr:content","jcr:path":"/apps/javashell/javashell.esp/jcr:content","rep:excerpt()":"
... \t\tthe result of executing the above code, it probably means that the Sling<\/strong> - Scripting - Java Support\n\t\tbundle is not installed or not active ...<\/span><\/div>","jcr:score":564},{"name":"jcr:content","jcr:path":"/apps/sling/webloader/html.esp/jcr:content","rep:excerpt()":"
admin \n \n Sling<\/strong> Webloader\n\n \n \n \n \tThis page reloads itself<\/span>It is based on the\n \tthe Jackrabbit populate.jsp example, ported to Sling<\/strong> text/javascript<\/span><\/div>","jcr:score":798},{"name":"webloader","jcr:path":"/bin/sling/webloader","rep:excerpt()":"
sling<\/strong>/webloader<\/span><\/div>","jcr:score":2821},{"name":"jcr:content","jcr:path":"/var/classes/forum/htmlArgs.class/jcr:content","rep:excerpt()":"
... currentSession;\n private org.apache.sling.scripting.core.ScriptHelper sling<\/strong>;\n private Object currentNode;\n private java.io.BufferedReader<\/span>... public org.apache.sling.scripting.core.ScriptHelper sling<\/strong>();\n public Object currentNode();\n public javax.jcr.Node ...<\/span><\/div>","jcr:score":499},{"name":"jcr:content","jcr:path":"/var/classes/helloworld/htmlArgs.class/jcr:content","rep:excerpt()":"
... currentSession;\n private org.apache.sling.scripting.core.ScriptHelper sling<\/strong>;\n private Object currentNode;\n private java.io.BufferedReader<\/span>... public org.apache.sling.scripting.core.ScriptHelper sling<\/strong>();\n public Object currentNode();\n public javax.jcr.Node ...<\/span><\/div>","jcr:score":499},{"name":"jcr:content","jcr:path":"/apps/blog/html.esp/jcr:content","rep:excerpt()":"
admin Sling<\/strong> microblog\n\n \n \n \n Title:\n\n \n \n ...<\/span><\/div>","jcr:score":1410},{"name":"","jcr:path":"/","rep:excerpt()":"
sling<\/strong>:redirect /index.html<\/span><\/div>","jcr:score":2257},{"name":"jcr:frozenNode","jcr:path":"/jcr:system/jcr:versionStorage/c6/a3/9f/c6a39f69-5a20-4730-a48c-59d802df9b27/1.0/jcr:frozenNode","rep:excerpt()":"
Sling<\/strong>. We use its DSL capability and support for XML literals to create type ...<\/span><\/div>","jcr:score":564},{"name":"jcr:frozenNode","jcr:path":"/jcr:system/jcr:versionStorage/bb/47/3f/bb473f19-14fb-4bd1-90e3-bf1ff1ac268f/1.0/jcr:frozenNode","rep:excerpt()":"
bb473f19-14fb-4bd1-90e3-bf1ff1ac268f Sling<\/strong> Apache Sling<\/strong> is an innovative web framework that is intended to bring back the fun to ...<\/span><\/div>","jcr:score":997}]

沒有留言:

張貼留言