abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neale <ne...@nealeupstone.com>
Subject Adding more elements within an extension
Date Tue, 30 Oct 2007 01:46:21 GMT
Hi,

I'm making use of extensions to put some of our own data into entries 
and feeds.

What I'd ideally want to be able to do is something like:

    MyListElement list = new MyListElement( "listName" );  // extends 
Element
    list.addValue("one");
    list.addValue("two");
    entry.addExtension( list );

For this to generate:

    <myns:mylistelement name="listName">
      <value>one</value>
      <value>two</value>
    </mylistelement>

Looking at the code for FOMEntry, the above looks like a rather onerous 
task.

Instead, I can use the existing code to do:

    Element e = entry.addExtension(MYLIST_QNAME);
    e.setAttributeValue("name", "listName");
   
    And what I now want is:
    Element value1 = e.createElement(VALUE_QNAME);
    value1.setText("one");

This doesn't seem possible.. what should I do?

Cheers,

Neale


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message