toXmlRootElementValue method
XmlRootElement?
toXmlRootElementValue()
Returns an XmlRootElement
corresponding to the value of the object being represented or null
if this object is not of type XmlRootElement
.
Implementation
XmlRootElement? toXmlRootElementValue() {
if (type?.isXmlAnnotationXmlRootElement == true) {
return XmlRootElement(
name: getField('name')?.toStringValue(),
namespace: getField('namespace')?.toStringValue(),
isSelfClosing: getField('isSelfClosing')?.toBoolValue(),
);
}
return null;
}