abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zeenat Lainwala <lainw...@us.ibm.com>
Subject Adding extensions to the entry
Date Tue, 22 Jul 2008 01:45:00 GMT
I am trying to add an extension to an entry. The extension itself is an 
anonymous complex type with the following serialized form
<xns:rootElement xmlns:xns="http://www.test.com">
        <xns:elementA>valueA</xns:elementA>
        <xns:elementB>valueB<xns:elementB>
</xns:rootElement>

I tried the following code but it didn't work.
Element rootElement = atomFactory.newElement(new QName(
"http://www.test.com", "rootElement"));
Element elementA = atomFactory.newElement(new QName("http://www.test.com", 
"elementA"));
Element elementB = atomFactory.newElement(new QName("http://www.test.com", 
"elementB"));
elementA.setParentElement(rootElement);
elementB.setParentElement(rootElement);
entry.addExtension(rootElement);

The parent of elementA and elementB is set to rootElement but elementA and 
elementB 
are not set as the children of rootElement. Is this a bug?

Is there any other way to achieve this?

Thanks,
Zeenat
IBM Websphere Process Server
650 645 8159, T/L:337 8159
Cell: 650 483 4022
lainwala@us.ibm.com
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message