<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><b><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;">Hi Harald,</span></span></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;"><br></span></span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;">Thank very much! Worked with your help! I test two solution, and I choose the second solution! =]</span></span></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;"><br></span></span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;">With Friendly Regards,</span></span></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;"><br></span></span></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;">Deiverson Silveira</span></span></div>
<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-weight: normal;"><br></span></span></div>Brabenetz, Harald</b></span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "> </span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><a href="mailto:opencms-dev%40opencms.org?Subject=%5Bopencms-dev%5D%20Problem%20for%20update%20one%20field%20xmlcontent%0A%20programmatic&In-Reply-To=AANLkTikWNMo9_SRSp23EAYR6K81wIWtw-nW7UZV2yMcL%40mail.gmail.com" title="[opencms-dev] Problem for update one field xmlcontent programmatic">harald.brabenetz at bearingpointconsulting.com </a></span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><br>
</span><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><i>Thu Jun 24 16:45:58 CEST 2010</i></span><p style="font-family: 'Times New Roman'; font-size: medium; "></p>
<ul style="font-family: 'Times New Roman'; font-size: medium; "><li>Previous message: <a href="http://lists.opencms.org/pipermail/opencms-dev/2010q2/034632.html">[opencms-dev] Problem for update one field xmlcontent programmatic</a></li>
<li><b>Messages sorted by:</b> <a href="http://lists.opencms.org/pipermail/opencms-dev/2010q2/date.html#34633">[ date ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2010q2/thread.html#34633">[ thread ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2010q2/subject.html#34633">[ subject ]</a> <a href="http://lists.opencms.org/pipermail/opencms-dev/2010q2/author.html#34633">[ author ]</a></li>
</ul><hr style="font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; "><pre>With "xmlcontent = CmsXmlContentFactory.createDocument(...)" a new document will be created.
try "xmlcontent = CmsXmlContentFactory.unmarshal(CmsObject, CmsFile)" instead.
Or use the Beta-1 Version of the Commons Module:
<a href="http://bp-cms-commons.sourceforge.net/m2site/infonova/modules/at.infonova.opencms.modules.commons/1.0-B1/">http://bp-cms-commons.sourceforge.net/m2site/infonova/modules/at.infonova.opencms.modules.commons/1.0-B1/</a>
There is a XmlContentEditorHelper:
-------------------------------
XmlContentEditorHelper helper = new XmlContentEditorHelper(getCmsObject(), CmsFile, Locale);
// edit XML Content
helper.setValue("Title", "Some test Message");
// save XML-Content.
helper.writeContent();
-------------------------------
with friendly regards,
Harald</pre></span>