generateXML (Document - Java)

Generates an XML representation of a document to the Writer. The XML conforms to the Domino Document DTD.

Note: This method is new with Release 5.0.3.

Defined in



public String generateXML()
    throws NotesException
public void generateXML( w)
    throws NotesException,
public void generateXML(Object style, XSLTResultTarget result)
    throws NotesException,, org.xml.sax.SAXException

Parameters w

The Writer that will receive the result XML.

Object style

The style sheet you want to use to transform the generated XML.

XSLTResultTarget result

The object that receives the transformed XML.

Return value


The XML representation of the document.


This method takes the same arguments as the transformXML method in EmbeddedObject, Item, MIMEEntity, and RichTextItem. The transformXML method reads the XML from an item, attachment, MIMEEntity, or rich text item and transforms the XML. The generateXML method generates the XML from the document and then transforms it.

The generateXML method supports the following simple items:

  • Text
  • Text list
  • Number
  • Number list
  • Datetime
  • Datetime list

To generate form semantics, you must call computeWithForm method before calling the generateXML method.