After greater inspection I have realised that your solution still isn't quite working correctly. The tagname of my content message now comes out as "any" the name of the property. I have tried geting the Abstract PayloadAny class to inherit from %XML.Element and setting it's tagname property, but the tag still comes out as any and I just get an extra <Tagname>ContentMessageTag</Tagname> in the XML. I have also noticed I have a number of extra tags namely <Local>false</Local> that appear after the payload message tags and after the wrapper tag.
On a brighter note I have managed to get rid quite a bit of code by making a number of my sub-object serial classes. thanks Wendy "Marvin Tener" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 1. Try the following: Create a class called AbstractPayload which is an > XML enabled abstract class. Inherit all payload objects from this class. > Change the type of the payload list property to be AbstractPayload and add > the XMLPROJECTION="element" property parameter to the payload property. The > using RootObject for wrapper should do all that you need. > > 2. If the different payloads are in different namespaces, manage this by > using the NAMESPACE parameter in each class to specify the XML namespace > that the class should be in. > > 3. If you are building these pieces up not using classes, just use > RootElement for the top level containing element. Then use Element method > for each of the other tags. > > 4. The way to get the embedded classes (like Address) to be automatically > instantiated is to make them serial classes. This works with either > registered or persistent objects. Sample.Address in Sample.Person is an > example with persistent classes, but he same works for subclasses of > %RegisteredObject. See Sample package that is in the SAMPLES namespace. > > 5. In some cases, the write command is just about as easy. However, most > of the time, using %XML.Writer gives a more descriptive approach with less > code and easier maintenance as well as automatic handling of XML namespaces. > > Marvin >
