public static function writeFullElement($xw, $tag, $attributes, $content)
 {
     $xw->startElement($tag);
     if (!is_null($attributes)) {
         foreach ($attributes as $name => $value) {
             $xw->writeAttribute($name, $value);
         }
     }
     if (is_array($content)) {
         foreach ($content as $values) {
             OMB_Plain_XRDS_Writer::writeFullElement($xw, $values[0], $values[1], $values[2]);
         }
     } else {
         $xw->text($content);
     }
     $xw->fullEndElement();
 }
 /**
  * Write a XRDS document
  *
  * Writes a XRDS document specifying the OMB service. Optionally uses a
  * given object of a class implementing OMB_XRDS_Writer for output. Else
  * OMB_Plain_XRDS_Writer is used.
  *
  * @param OMB_XRDS_Mapper $xrds_mapper An object mapping actions to URLs
  * @param OMB_XRDS_Writer $xrds_writer Optional; The OMB_XRDS_Writer used to
  *                                     write the XRDS document
  *
  * @access public
  *
  * @return mixed Depends on the used OMB_XRDS_Writer; OMB_Plain_XRDS_Writer
  *               returns nothing.
  */
 public function writeXRDS($xrds_mapper, $xrds_writer = null)
 {
     if ($xrds_writer == null) {
         require_once 'plain_xrds_writer.php';
         $xrds_writer = new OMB_Plain_XRDS_Writer();
     }
     return $xrds_writer->writeXRDS($this->user, $xrds_mapper);
 }