<font size=2 face="Trebuchet MS">Hi Mario,</font>
<br>
<br><font size=2 face="Trebuchet MS"> Thanks
for the advise.</font>
<br>
<br><font size=2 face="Trebuchet MS"> I
tried to use the CmsXmlContentFactory and CmsXmlContent, but i am getting
ArrayIndexOutofBounds exception.The code is shown below. Could you advise
the reason for the error.</font>
<br>
<br><font size=2 face="Trebuchet MS">CmsJspActionElement cms = new CmsJspActionElement
(pageContext, request, response);</font>
<br><font size=2 face="Trebuchet MS">CmsObject cmso = cms.getCmsObject();</font>
<br><font size=2 face="Trebuchet MS">String uri = cms.getRequestContext().getUri();
</font>
<br><font size=2 face="Trebuchet MS">String tempUri= uri.split("/sites/default")[1]
; </font>
<br><font size=2 face="Trebuchet MS">CmsFile file = cmso.readFile(tempUri)
;</font>
<br><font size=2 face="Trebuchet MS">CmsXmlContent xmlContent = CmsXmlContentFactory.unmarshal(cmso,file);</font>
<br><font size=2 face="Trebuchet MS">String message = xmlContent.getValue("Link",
enLocale, 0).getStringValue(cmso);</font>
<br>
<br>
<br>
<br><font size=2 face="Trebuchet MS">Regards,<br>
Raghu D</font>
<table>
<tr>
<td>
<tr>
<td>
<tr valign=top>
<td></table>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Mario Jäger <m.jaeger@alkacon.com></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif">opencms-dev@opencms.org</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">06/29/2011 05:40 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">Re: [opencms-dev]
<cms:contentshow element="Link"/></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif">opencms-dev-bounces@opencms.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi Raghu,<br>
<br>
I think, that you want to know how to get an xml content element value
<br>
in a Java Bean for example.(?) Therefore, you have to unmarshal the file
<br>
using the org.opencms.xml.content.CmsXmlContentFactory.unmarshal() <br>
method. You have the org.opencms.xml.content.CmsXmlContent object from
<br>
that file then. With the XPath from the element (you want the value <br>
from) you can get the value using the getValue() methods on that object
<br>
then.<br>
<br>
Kind Regards,<br>
Mario.<br>
<br>
<br>
<br>
Am 29.06.2011 07:12, schrieb Raghu D:<br>
> Hi All,<br>
> Is it possible to get the value of <cms:contentshow element="Link"/>
in<br>
> java ?<br>
><br>
> Thanks and Regards,<br>
> *Raghu D*<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
<br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> This mail is sent to you from the opencms-dev mailing list<br>
> To change your list options, or to unsubscribe from the list, please
visit<br>
> </font></tt><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev"><tt><font size=2>http://lists.opencms.org/mailman/listinfo/opencms-dev</font></tt></a><tt><font size=2><br>
<br>
<br>
-- <br>
-------------------<br>
Mario Jäger<br>
<br>
Alkacon Software GmbH - The OpenCms Experts<br>
</font></tt><a href=http://www.alkacon.com/><tt><font size=2>http://www.alkacon.com</font></tt></a><tt><font size=2>
- </font></tt><a href=http://www.opencms.org/><tt><font size=2>http://www.opencms.org</font></tt></a><tt><font size=2><br>
<br>
_______________________________________________<br>
This mail is sent to you from the opencms-dev mailing list<br>
To change your list options, or to unsubscribe from the list, please visit<br>
</font></tt><a href="http://lists.opencms.org/mailman/listinfo/opencms-dev"><tt><font size=2>http://lists.opencms.org/mailman/listinfo/opencms-dev</font></tt></a><tt><font size=2><br>
</font></tt>
<br><font size=2 face="sans-serif"><br>
</font>
<br><font size=2 face="sans-serif"><br>
<br>
<br>
<br>
DISCLAIMER:</font><font size=3> </font><font size=1 color=#a2a2a2 face="Tahoma"><br>
<br>
"The information in this e-mail and any attachment is intended only
for the person to whom it is addressed and may contain confidential and/or
privileged material. If you have received this e-mail in error, kindly
contact the sender and destroy all copies of the original communication.
IBS makes no warranty, express or implied, nor guarantees the accuracy,
adequacy or completeness of the information contained in this email or
any attachment and is not liable for any errors, defects, omissions, viruses
or for resultant loss or damage, if any, direct or indirect."</font><font size=3><br>
</font><font size=1><br>
</font><font size=3><br>
</font>
<br>
<br>