XML Serialization - output ID
I have a class:
Class test.Person Extends (%Persistent, %XML.Adaptor)
{
Property Name;
}
I want to serialize it into this XML:
<Person>
<Id>1</Id>
<Name>Ed</Name>
</Person>
Is it possible?
It's for the Visual Trace so I can't use %XML.Writer.
Try:
Class test.Person Extends (%Persistent, %XML.Adaptor) { Property Id As %Integer [ Calculated, SqlComputeCode = { Set {*}={%%ID}}, SqlComputed ]; Property Name; }
if you don't want to touch the Class you may inherit it from some common Super-Class.
Or