}
function asString()
+ {
+ $xs = new XMLStringer();
+ $this->outputTo($xs);
+ return $xs->getString();
+ }
+
+ function outputTo($xo)
{
$attribs = array();
if ($this->term !== null) {
if ($this->label !== null) {
$attribs['label'] = $this->label;
}
- $xs = new XMLStringer();
- $xs->element('category', $attribs);
- return $xs->getString();
+ $xo->element('category', $attribs);
}
}