[opencms-dev] Code Question
John James Valentine
jjvalent at gmail.com
Fri Mar 8 19:43:47 CET 2013
Hi Mailing List,
I have a question about a change in the CmsSolrDocumentXmlContent class.
The javadoc for the extract content method states that all XML nodes will be
in the item map and the XML elements will be accessible using xpath.
In 8.5.0 all XML nodes were in the content items map, in 8.5.1, not all XML
nodes are available in in the content items map. Looking at the code
history, the following line was removed from the CmsSolrDocumentXmlContent
class:
items.put(xpath, extracted);
Here is the javadoc for the extract content method:
Returns the raw text content of a given VFS resource of type
CmsResourceTypeXmlContent.
All XML nodes from the content for all locales will be stored separately in
the item map which you can access using
<eclipse-javadoc:%E2%98%82=com.dispatch.framework/C:%5C/Users%5C/jvalentine%
5C/.m2%5C/repository%5C/org%5C/opencms%5C/opencms-core%5C/8.5.1%5C/opencms-c
ore-8.5.1.jar%3Corg.opencms.search.documents(CmsDocumentXmlContent.class%E2%
98%83CmsDocumentXmlContent~extractContent~Lorg.opencms.file.CmsObject;~Lorg.
opencms.file.CmsResource;~Lorg.opencms.search.CmsSearchIndex;%E2%98%82CmsExt
ractionResult%E2%98%82getContentItems%E2%98%82>
CmsExtractionResult.getContentItems(). The XML elements will be accessible
using their xpath. The xpath will have the form like for example Text[1] or
Nested[1]/Text[1].
Was this change by design? If so, how may we access all the XML nodes in
the content items map?
Let me know if anyone has any questions.
Thanks,
~John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130308/0f7b8f8c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6073 bytes
Desc: not available
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130308/0f7b8f8c/attachment.bin>
More information about the opencms-dev
mailing list