<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NO-BOK link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Yves,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Maybe something like this (I haven’t tested this):<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 0). setStringValue(cmso, "iPod");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 1).setStringValue(cmso, "iPhone"); <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>xmlContent.addValue(cmsObject, "Tag", new Locale("en"), 2).setStringValue(cmso, "iPad");<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>HTH<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Paul<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <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<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></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">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<o:p></o:p></p></div></body></html>