Hi Paul,<br><br>this seems to work. Thank you for your help !<br><br><div class="gmail_quote">On 6 October 2011 11:00, Paul-Inge Flakstad <span dir="ltr"><<a href="mailto:flakstad@npolar.no">flakstad@npolar.no</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div link="blue" vlink="purple" lang="NO-BOK"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Hi Yves,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Maybe something like this (I haven’t tested this):<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 0). setStringValue(cmso, "iPod");<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 1).setStringValue(cmso, "iPhone"); <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 2).setStringValue(cmso, "iPad");<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">HTH<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Cheers,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US">Paul<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D" lang="EN-US"><u></u> <u></u></span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt" lang="EN-US">From:</span></b><span style="font-size:10.0pt" lang="EN-US"> <a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a> [mailto:<a href="mailto:opencms-dev-bounces@opencms.org" target="_blank">opencms-dev-bounces@opencms.org</a>] <b>On Behalf Of </b>Yves Glodt<br>
<b>Sent:</b> 6. oktober 2011 10:36<br><b>To:</b> The OpenCms mailing list<br><b>Subject:</b> [opencms-dev] Writing multiple nodes of the same name using CmsXmlContent<u></u><u></u></span></p></div><div><div></div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hello,<br><br>I have a problem writing mulsiple nodes of the same name using the OpenCms Api.<br><br>This is what I want to achieve:<br><br><span style="font-family:"Courier New";color:#6600CC"><XmlContentDocSimpleTypes xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>" xsi:noNamespaceSchemaLocation="opencms://sites/knowledgebase/core/document.xsd"><br>
<XmlContentDocSimpleType language="en"><br> <Title><![CDATA[My Title]]></Title><br> <Content name="Content0"><br> <links/><br> <content><![CDATA[<p>lorem ipsum ...</p>]]></content><br>
</Content><br> <Tag><![CDATA[linux]]></Tag><br> <Tag><![CDATA[web]]></Tag><br> <Tag><![CDATA[java]]></Tag><br> <Author><![CDATA[me]]></Author><br>
<ChangedDate>1317474420000</ChangedDate><br> </XmlContentDocSimpleType><br></XmlContentDocSimpleTypes></span><br><br><br>And this is how I proceed:<br><br><span style="font-family:"Courier New";color:#6600CC">CmsXmlContent xmlContent = null;<br>
<br>I_CmsXmlContentValue xmlContentValue = null;<br><br>xmlContentValue = xmlContent.getValue("Title", new Locale("en"));<br>xmlContentValue.setStringValue(cmso, "My Title");<br><br>...<br><br>
xmlContentValue = xmlContent.getValue("Tag", new Locale("en"));<br>xmlContentValue.setStringValue(cmso, "linux");</span><br><br><br>If I repeat the last 2 calls, of course the "Tag" node is replaced.<br>
How can I add another "Tag" ? :-)<br><br><br>Best regards,<br>Yves<u></u><u></u></p></div></div></div></div><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>
<a href="http://lists.opencms.org/mailman/listinfo/opencms-dev" target="_blank">http://lists.opencms.org/mailman/listinfo/opencms-dev</a><br></blockquote></div><br>