[opencms-dev] how to update xml values within a CmsFile

frankg fg_salesforce at hotmail.com
Thu May 29 02:21:33 CEST 2008


Hi,
 
Given certain conditions, I'm trying to update an xml value within a CmsFile programmatically.  I've gotten to a point where I've been able to unmarshal the file and can retrieve the value, but am looking for some direction on how to update this value.  Any help would be appreciated.
 
This is what I have so far:
 
CmsFile resourceFile = CmsFile.upgrade(cr, cms);CmsXmlContent xmlDocument = CmsXmlContentFactory.unmarshal(cms, resourceFile, true);Locale locale = new Locale(cms.getRequestContext().getLocale().toString());String value = xmlDocument.getStringValue(cms, "Section/ABC", locale);
 
// if value is true, then update the value
if ("true".equals(value)) {
     // ???
 
}
 
Thanks so much in advance!
 
Frank
_________________________________________________________________
Give to a good cause with every e-mail. Join the i’m Initiative from Microsoft.
http://im.live.com/Messenger/IM/Join/Default.aspx?souce=EML_WL_ GoodCause
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20080528/9736f87a/attachment.htm>


More information about the opencms-dev mailing list