[opencms-dev] Adding a new element into xml content programatically

Chuck Mysak chuck.mysak at gmail.com
Thu Dec 11 20:57:18 CET 2008


Hello,

I've tried it, but the only method I found there that was related to what I
have to do was *addValue*, but this only works if the element is already in
the document. I need to find a way to add a new element (from the editor
it's the little green plus sign) to the document that's a OpenCmsVfsFile. Is
there another method there that I've overlooked?

Thank you,

Chuck

On Thu, Dec 11, 2008 at 9:34 PM, Sebastian Himberger <
sebastian.himberger at gmx.de> wrote:

> Hi Chuck,
>
> have you tried this? I don't really now if this is what you're looking for.
>
>
> http://files.opencms.org/javadoc/core/org/opencms/xml/content/CmsXmlContent.html#addValue(org.opencms.file.CmsObject,%20java.lang.String,%20java.util.Locale,%20int)
>
> best regards,
> Sebastian
>
> Chuck Mysak schrieb:
>  > Hello all,
> >
> > I have a problem regarding adding a new element into a structured
> > content file.
> > The element is of *OpenCmsVfsFile* type.
> >
> > I have tried the following:
> > - editing the element using CmsXmlContent doesn't do the trick, the
> > element doesn't exist (by default it has to be added in the editor)
> > - adding the element using CmsXmlPage didn't work, because when I
> > unmarshalled the page using the existing file, I was left with an
> > empty xml
> >
> > If someone has an idea, please help
> >
> > Thank you,
> >
> > Chuck
> > ------------------------------------------------------------------------
> >
> >
> > _______________________________________________
> > This mail is sent to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> visit
> > http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20081211/9bc35ca8/attachment.htm>


More information about the opencms-dev mailing list