public void generateAtom(XmlWriter w,ExtensionProfile extProfile) throws IOException {
  ArrayList<XmlWriter.Attribute> attrs=new ArrayList<XmlWriter.Attribute>(3);
  List<XmlNamespace> nsDecls=new ArrayList<XmlNamespace>();
  if (rel != null) {
    attrs.add(new XmlWriter.Attribute("rel",rel));
  }
  if (type != null) {
    attrs.add(new XmlWriter.Attribute("type",type));
  }
  if (href != null) {
    attrs.add(new XmlWriter.Attribute("href",href));
  }
  if (hrefLang != null) {
    attrs.add(new XmlWriter.Attribute("hreflang",hrefLang));
  }
  if (title != null) {
    attrs.add(new XmlWriter.Attribute("title",title));
  }
  if (titleLang != null) {
    attrs.add(new XmlWriter.Attribute("xml:lang",titleLang));
  }
  if (length != -1) {
    attrs.add(new XmlWriter.Attribute("length",String.valueOf(length)));
  }
  if (etag != null) {
    nsDecls.add(Namespaces.gNs);
    attrs.add(new XmlWriter.Attribute(Namespaces.gAlias,"etag",etag));
  }
  generateStartElement(w,Namespaces.atomNs,"link",attrs,nsDecls);
  if (content != null) {
    content.generateAtom(w,extProfile);
  }
  generateExtensions(w,extProfile);
  w.endElement(Namespaces.atomNs,"link");
}

public void generateAtom ( XmlWriter w , ExtensionProfile extProfile ) throws IOException { ArrayList < XmlWriter . Attribute > attrs = new ArrayList < XmlWriter . Attribute > ( 3 ) ; List < XmlNamespace > nsDecls = new ArrayList < XmlNamespace > ( ) ; if ( rel != null ) { attrs . add ( new XmlWriter . Attribute ( "rel" , rel ) ) ; } if ( type != null ) { attrs . add ( new XmlWriter . Attribute ( "type" , type ) ) ; } if ( href != null ) { attrs . add ( new XmlWriter . Attribute ( "href" , href ) ) ; } if ( hrefLang != null ) { attrs . add ( new XmlWriter . Attribute ( "hreflang" , hrefLang ) ) ; } if ( title != null ) { attrs . add ( new XmlWriter . Attribute ( "title" , title ) ) ; } if ( titleLang != null ) { attrs . add ( new XmlWriter . Attribute ( "xml:lang" , titleLang ) ) ; } if ( length != - 1 ) { attrs . add ( new XmlWriter . Attribute ( "length" , String . valueOf ( length ) ) ) ; } if ( etag != null ) { nsDecls . add ( Namespaces . gNs ) ; attrs . add ( new XmlWriter . Attribute ( Namespaces . gAlias , "etag" , etag ) ) ; } generateStartElement ( w , Namespaces . atomNs , "link" , attrs , nsDecls ) ; if ( content != null ) { content . generateAtom ( w , extProfile ) ; } generateExtensions ( w , extProfile ) ; w . endElement ( Namespaces . atomNs , "link" ) ; }
generates xml in the atom format .
