An object element requires two builder statements. Builder statements for the object element type describes the builder statements and arguments for an object element.
Builder statement |
Description |
Arguments |
Required / optional |
---|---|---|---|
addObject() |
Adds the instance to the XML document. It creates the open tag for the object declaration. |
Instance Name |
Optional |
Class Name |
Required |
||
Method |
Optional |
||
addObjectClosing() |
Adds the closing tag for the object declaration in the XML file. |
No Arguments |
N/A |
addNullObject |
Adds a null object "<object/>" into the output XML document. |
No Argument |
N/A |
For example, to export an instance of the ServiceSubscriber class to the XML document, the builder statement resembles this:
foreach svcSub (svcSubList) { builder->addObject(svcSub, "ServiceSubscriber"); builder->addAttribute(svcSub, "DisplayName"); builder->addObjectClosing();