<div>Hi,</div>
<div> </div>
<div>My requirement is to add new value for content through program.</div>
<div> </div>
<div>There is one method addValue in CmsXmlContent class.</div>
<div> </div><pre>public <a title="interface in org.opencms.xml.types" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/xml/types/I_CmsXmlContentValue.html">
I_CmsXmlContentValue</a> <b>addValue</b>(<a title="class in org.opencms.file" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/file/CmsObject.html">
CmsObject</a> cms,
java.lang.String <strong>path</strong>,
java.util.Locale locale,
int index)
throws <a title="class in org.opencms.main" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/main/CmsIllegalArgumentException.html">
CmsIllegalArgumentException</a>,
<a title="class in org.opencms.main" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/main/CmsRuntimeException.html">
CmsRuntimeException</a></pre>
<dl>
<dd>Adds a new XML content value for the given element name and locale at the given index position to this XML content document.
<p>
<p></p>
<dd>
<dl></dl>
<dd>
<dl>
<dt><b>Parameters:</b>
<dd><code>cms</code> - the current users OpenCms context
<dd><strong><code>path</code> - the path to the XML content value element</strong>
<dd><code>locale</code> - the locale where to add the new value
<dd><code>index</code> - the index where to add the value (relative to all other values of this type)
<dt><b>Returns:</b>
<dd>the created XML content value
<dt><b>Throws:</b>
<dd><code><a title="class in org.opencms.main" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/main/CmsIllegalArgumentException.html">
CmsIllegalArgumentException</a></code> - if the given path is invalid
<dd><code><a title="class in org.opencms.main" href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/main/CmsRuntimeException.html">
CmsRuntimeException</a></code> - if the element identified by the path already occured <a href="file://dt2752-sridhar/intranet/templates/com.alkacon.documentation.documentation_javadoc_1.0.0/alkacon-documentation/javadoc/core/org/opencms/xml/types/I_CmsXmlSchemaType.html#getMaxOccurs()">
<code>I_CmsXmlSchemaType.getMaxOccurs()</code></a> or the given <code>index</code> is invalid (too high).</dd></dd></dt></dd></dt></dd></dd></dd></dd></dt></dl></dd></dd></p></dd></dl>
<div>We should give the path of the element to be added. </div>
<div> </div>
<div>Any of you ever used this method and if so can you tell me what kind of value needed to be passed for the argument???</div>
<div> </div>
<div>Regards<br>Manoj</div>